+
+test_bare_filename_parsed :: Assertion
+test_bare_filename_parsed =
+ assertEqual "Filename is 'example.jpg'" "example.jpg" actual_result
+ where
+ url = "example.jpg"
+ actual_result = fromJust $ filename url
+
+test_absolute_filename_parsed :: Assertion
+test_absolute_filename_parsed =
+ assertEqual "Filename is 'example.jpg'" "example.jpg" actual_result
+ where
+ url = "http://lwn.net/one/two/example.jpg"
+ actual_result = fromJust $ filename url
+
+test_relative_filename_parsed :: Assertion
+test_relative_filename_parsed =
+ assertEqual "Filename is 'example.jpg'" "example.jpg" actual_result
+ where
+ url = "/one/two/example.jpg"
+ actual_result = fromJust $ filename url
+
+