Change the generated file to be in module Test
[packages/filepath.git] / tests / Test.hs
1 module Test(main) where
2 import AutoTest
3 import qualified System.FilePath.Windows as W
4 import qualified System.FilePath.Posix as P
5 main :: IO ()
6 main = do
7 block1
8 block2
9 block3
10 block4
11 block5
12 block6
13 block7
14 block8
15 block9
16 block10
17 block11
18 block12
19 block13
20 block14
21 block1 = do
22 putStrLn "Test 1, from line 120"
23 constTest (W.pathSeparator == '\\')
24 putStrLn "Test 2, from line 121"
25 constTest (P.pathSeparator == '/')
26 putStrLn "Test 3, from line 122"
27 constTest (W.isPathSeparator W.pathSeparator)
28 putStrLn "Test 4, from line 122"
29 constTest (P.isPathSeparator P.pathSeparator)
30 putStrLn "Test 5, from line 128"
31 constTest (W.pathSeparators == [ '\\' , '/' ])
32 putStrLn "Test 6, from line 129"
33 constTest (P.pathSeparators == [ '/' ])
34 putStrLn "Test 7, from line 130"
35 constTest (W.pathSeparator ` elem ` W.pathSeparators)
36 putStrLn "Test 8, from line 130"
37 constTest (P.pathSeparator ` elem ` P.pathSeparators)
38 putStrLn "Test 9, from line 144"
39 constTest (W.searchPathSeparator == ';')
40 putStrLn "Test 10, from line 145"
41 constTest (P.searchPathSeparator == ':')
42 putStrLn "Test 11, from line 158"
43 constTest (W.extSeparator == '.')
44 putStrLn "Test 12, from line 158"
45 constTest (P.extSeparator == '.')
46 putStrLn "Test 13, from line 179"
47 constTest (P.splitSearchPath "File1:File2:File3" == [ "File1" , "File2" , "File3" ])
48 putStrLn "Test 14, from line 180"
49 constTest (P.splitSearchPath "File1::File2:File3" == [ "File1" , "." , "File2" , "File3" ])
50 putStrLn "Test 15, from line 181"
51 constTest (W.splitSearchPath "File1;File2;File3" == [ "File1" , "File2" , "File3" ])
52 putStrLn "Test 16, from line 182"
53 constTest (W.splitSearchPath "File1;;File2;File3" == [ "File1" , "File2" , "File3" ])
54 putStrLn "Test 17, from line 206"
55 constTest (W.splitExtension "file.txt" == ( "file" , ".txt" ))
56 putStrLn "Test 18, from line 206"
57 constTest (P.splitExtension "file.txt" == ( "file" , ".txt" ))
58 putStrLn "Test 19, from line 207"
59 constTest (W.splitExtension "file" == ( "file" , "" ))
60 putStrLn "Test 20, from line 207"
61 constTest (P.splitExtension "file" == ( "file" , "" ))
62 putStrLn "Test 21, from line 208"
63 constTest (W.splitExtension "file/file.txt" == ( "file/file" , ".txt" ))
64 putStrLn "Test 22, from line 208"
65 constTest (P.splitExtension "file/file.txt" == ( "file/file" , ".txt" ))
66 putStrLn "Test 23, from line 209"
67 constTest (W.splitExtension "file.txt/boris" == ( "file.txt/boris" , "" ))
68 putStrLn "Test 24, from line 209"
69 constTest (P.splitExtension "file.txt/boris" == ( "file.txt/boris" , "" ))
70 putStrLn "Test 25, from line 210"
71 constTest (W.splitExtension "file.txt/boris.ext" == ( "file.txt/boris" , ".ext" ))
72 block2 = do
73 putStrLn "Test 26, from line 210"
74 constTest (P.splitExtension "file.txt/boris.ext" == ( "file.txt/boris" , ".ext" ))
75 putStrLn "Test 27, from line 211"
76 constTest (W.splitExtension "file/path.txt.bob.fred" == ( "file/path.txt.bob" , ".fred" ))
77 putStrLn "Test 28, from line 211"
78 constTest (P.splitExtension "file/path.txt.bob.fred" == ( "file/path.txt.bob" , ".fred" ))
79 putStrLn "Test 29, from line 212"
80 constTest (W.splitExtension "file/path.txt/" == ( "file/path.txt/" , "" ))
81 putStrLn "Test 30, from line 212"
82 constTest (P.splitExtension "file/path.txt/" == ( "file/path.txt/" , "" ))
83 putStrLn "Test 31, from line 231"
84 constTest (W.replaceExtension "file.txt" ".bob" == "file.bob")
85 putStrLn "Test 32, from line 231"
86 constTest (P.replaceExtension "file.txt" ".bob" == "file.bob")
87 putStrLn "Test 33, from line 232"
88 constTest (W.replaceExtension "file.txt" "bob" == "file.bob")
89 putStrLn "Test 34, from line 232"
90 constTest (P.replaceExtension "file.txt" "bob" == "file.bob")
91 putStrLn "Test 35, from line 233"
92 constTest (W.replaceExtension "file" ".bob" == "file.bob")
93 putStrLn "Test 36, from line 233"
94 constTest (P.replaceExtension "file" ".bob" == "file.bob")
95 putStrLn "Test 37, from line 234"
96 constTest (W.replaceExtension "file.txt" "" == "file")
97 putStrLn "Test 38, from line 234"
98 constTest (P.replaceExtension "file.txt" "" == "file")
99 putStrLn "Test 39, from line 235"
100 constTest (W.replaceExtension "file.fred.bob" "txt" == "file.fred.txt")
101 putStrLn "Test 40, from line 235"
102 constTest (P.replaceExtension "file.fred.bob" "txt" == "file.fred.txt")
103 putStrLn "Test 41, from line 252"
104 constTest (W.addExtension "file.txt" "bib" == "file.txt.bib")
105 putStrLn "Test 42, from line 252"
106 constTest (P.addExtension "file.txt" "bib" == "file.txt.bib")
107 putStrLn "Test 43, from line 253"
108 constTest (W.addExtension "file." ".bib" == "file..bib")
109 putStrLn "Test 44, from line 253"
110 constTest (P.addExtension "file." ".bib" == "file..bib")
111 putStrLn "Test 45, from line 254"
112 constTest (W.addExtension "file" ".bib" == "file.bib")
113 putStrLn "Test 46, from line 254"
114 constTest (P.addExtension "file" ".bib" == "file.bib")
115 putStrLn "Test 47, from line 255"
116 constTest (W.addExtension "/" "x" == "/.x")
117 putStrLn "Test 48, from line 255"
118 constTest (P.addExtension "/" "x" == "/.x")
119 putStrLn "Test 49, from line 257"
120 constTest (W.addExtension "\\\\share" ".txt" == "\\\\share\\.txt")
121 putStrLn "Test 50, from line 278"
122 constTest (W.splitExtensions "file.tar.gz" == ( "file" , ".tar.gz" ))
123 block3 = do
124 putStrLn "Test 51, from line 278"
125 constTest (P.splitExtensions "file.tar.gz" == ( "file" , ".tar.gz" ))
126 putStrLn "Test 52, from line 293"
127 constTest (W.takeExtensions "file.tar.gz" == ".tar.gz")
128 putStrLn "Test 53, from line 293"
129 constTest (P.takeExtensions "file.tar.gz" == ".tar.gz")
130 putStrLn "Test 54, from line 312"
131 constTest (W.splitDrive "file" == ( "" , "file" ))
132 putStrLn "Test 55, from line 313"
133 constTest (W.splitDrive "c:/file" == ( "c:/" , "file" ))
134 putStrLn "Test 56, from line 314"
135 constTest (W.splitDrive "c:\\file" == ( "c:\\" , "file" ))
136 putStrLn "Test 57, from line 315"
137 constTest (W.splitDrive "\\\\shared\\test" == ( "\\\\shared\\" , "test" ))
138 putStrLn "Test 58, from line 316"
139 constTest (W.splitDrive "\\\\shared" == ( "\\\\shared" , "" ))
140 putStrLn "Test 59, from line 317"
141 constTest (W.splitDrive "\\\\?\\UNC\\shared\\file" == ( "\\\\?\\UNC\\shared\\" , "file" ))
142 putStrLn "Test 60, from line 318"
143 constTest (W.splitDrive "\\\\?\\UNCshared\\file" == ( "\\\\?\\" , "UNCshared\\file" ))
144 putStrLn "Test 61, from line 319"
145 constTest (W.splitDrive "\\\\?\\d:\\file" == ( "\\\\?\\d:\\" , "file" ))
146 putStrLn "Test 62, from line 320"
147 constTest (W.splitDrive "/d" == ( "" , "/d" ))
148 putStrLn "Test 63, from line 321"
149 constTest (P.splitDrive "/test" == ( "/" , "test" ))
150 putStrLn "Test 64, from line 322"
151 constTest (P.splitDrive "//test" == ( "//" , "test" ))
152 putStrLn "Test 65, from line 323"
153 constTest (P.splitDrive "test/file" == ( "" , "test/file" ))
154 putStrLn "Test 66, from line 324"
155 constTest (P.splitDrive "file" == ( "" , "file" ))
156 putStrLn "Test 67, from line 381"
157 constTest (W.joinDrive "C:" "foo" == "C:foo")
158 putStrLn "Test 68, from line 382"
159 constTest (W.joinDrive "C:\\" "bar" == "C:\\bar")
160 putStrLn "Test 69, from line 383"
161 constTest (W.joinDrive "\\\\share" "foo" == "\\\\share\\foo")
162 putStrLn "Test 70, from line 384"
163 constTest (W.joinDrive "/:" "foo" == "/:\\foo")
164 putStrLn "Test 71, from line 403"
165 constTest (P.hasDrive "/foo" == True)
166 putStrLn "Test 72, from line 404"
167 constTest (W.hasDrive "C:\\foo" == True)
168 putStrLn "Test 73, from line 405"
169 constTest (W.hasDrive "C:foo" == True)
170 putStrLn "Test 74, from line 406"
171 constTest (W.hasDrive "foo" == False)
172 putStrLn "Test 75, from line 406"
173 constTest (P.hasDrive "foo" == False)
174 block4 = do
175 putStrLn "Test 76, from line 407"
176 constTest (W.hasDrive "" == False)
177 putStrLn "Test 77, from line 407"
178 constTest (P.hasDrive "" == False)
179 putStrLn "Test 78, from line 414"
180 constTest (P.isDrive "/" == True)
181 putStrLn "Test 79, from line 415"
182 constTest (P.isDrive "/foo" == False)
183 putStrLn "Test 80, from line 416"
184 constTest (W.isDrive "C:\\" == True)
185 putStrLn "Test 81, from line 417"
186 constTest (W.isDrive "C:\\foo" == False)
187 putStrLn "Test 82, from line 418"
188 constTest (W.isDrive "" == False)
189 putStrLn "Test 83, from line 418"
190 constTest (P.isDrive "" == False)
191 putStrLn "Test 84, from line 430"
192 constTest (W.splitFileName "file/bob.txt" == ( "file/" , "bob.txt" ))
193 putStrLn "Test 85, from line 430"
194 constTest (P.splitFileName "file/bob.txt" == ( "file/" , "bob.txt" ))
195 putStrLn "Test 86, from line 431"
196 constTest (W.splitFileName "file/" == ( "file/" , "" ))
197 putStrLn "Test 87, from line 431"
198 constTest (P.splitFileName "file/" == ( "file/" , "" ))
199 putStrLn "Test 88, from line 432"
200 constTest (W.splitFileName "bob" == ( "./" , "bob" ))
201 putStrLn "Test 89, from line 432"
202 constTest (P.splitFileName "bob" == ( "./" , "bob" ))
203 putStrLn "Test 90, from line 433"
204 constTest (P.splitFileName "/" == ( "/" , "" ))
205 putStrLn "Test 91, from line 434"
206 constTest (W.splitFileName "c:" == ( "c:" , "" ))
207 putStrLn "Test 92, from line 467"
208 constTest (W.takeFileName "test/" == "")
209 putStrLn "Test 93, from line 467"
210 constTest (P.takeFileName "test/" == "")
211 putStrLn "Test 94, from line 478"
212 constTest (W.takeBaseName "file/test.txt" == "test")
213 putStrLn "Test 95, from line 478"
214 constTest (P.takeBaseName "file/test.txt" == "test")
215 putStrLn "Test 96, from line 479"
216 constTest (W.takeBaseName "dave.ext" == "dave")
217 putStrLn "Test 97, from line 479"
218 constTest (P.takeBaseName "dave.ext" == "dave")
219 putStrLn "Test 98, from line 480"
220 constTest (W.takeBaseName "" == "")
221 putStrLn "Test 99, from line 480"
222 constTest (P.takeBaseName "" == "")
223 putStrLn "Test 100, from line 481"
224 constTest (W.takeBaseName "test" == "test")
225 block5 = do
226 putStrLn "Test 101, from line 481"
227 constTest (P.takeBaseName "test" == "test")
228 putStrLn "Test 102, from line 483"
229 constTest (W.takeBaseName "file/file.tar.gz" == "file.tar")
230 putStrLn "Test 103, from line 483"
231 constTest (P.takeBaseName "file/file.tar.gz" == "file.tar")
232 putStrLn "Test 104, from line 489"
233 constTest (W.replaceBaseName "file/test.txt" "bob" == "file/bob.txt")
234 putStrLn "Test 105, from line 489"
235 constTest (P.replaceBaseName "file/test.txt" "bob" == "file/bob.txt")
236 putStrLn "Test 106, from line 490"
237 constTest (W.replaceBaseName "fred" "bill" == "bill")
238 putStrLn "Test 107, from line 490"
239 constTest (P.replaceBaseName "fred" "bill" == "bill")
240 putStrLn "Test 108, from line 491"
241 constTest (W.replaceBaseName "/dave/fred/bob.gz.tar" "new" == "/dave/fred/new.tar")
242 putStrLn "Test 109, from line 491"
243 constTest (P.replaceBaseName "/dave/fred/bob.gz.tar" "new" == "/dave/fred/new.tar")
244 putStrLn "Test 110, from line 501"
245 constTest (W.hasTrailingPathSeparator "test" == False)
246 putStrLn "Test 111, from line 501"
247 constTest (P.hasTrailingPathSeparator "test" == False)
248 putStrLn "Test 112, from line 502"
249 constTest (W.hasTrailingPathSeparator "test/" == True)
250 putStrLn "Test 113, from line 502"
251 constTest (P.hasTrailingPathSeparator "test/" == True)
252 putStrLn "Test 114, from line 517"
253 constTest (P.addTrailingPathSeparator "test/rest" == "test/rest/")
254 putStrLn "Test 115, from line 524"
255 constTest (W.dropTrailingPathSeparator "file/test/" == "file/test")
256 putStrLn "Test 116, from line 524"
257 constTest (P.dropTrailingPathSeparator "file/test/" == "file/test")
258 putStrLn "Test 117, from line 525"
259 constTest (W.dropTrailingPathSeparator "/" == "/")
260 putStrLn "Test 118, from line 525"
261 constTest (P.dropTrailingPathSeparator "/" == "/")
262 putStrLn "Test 119, from line 526"
263 constTest (W.dropTrailingPathSeparator "\\" == "\\")
264 putStrLn "Test 120, from line 539"
265 constTest (W.takeDirectory "foo" == ".")
266 putStrLn "Test 121, from line 539"
267 constTest (P.takeDirectory "foo" == ".")
268 putStrLn "Test 122, from line 540"
269 constTest (W.takeDirectory "/" == "/")
270 putStrLn "Test 123, from line 540"
271 constTest (P.takeDirectory "/" == "/")
272 putStrLn "Test 124, from line 541"
273 constTest (W.takeDirectory "/foo" == "/")
274 putStrLn "Test 125, from line 541"
275 constTest (P.takeDirectory "/foo" == "/")
276 block6 = do
277 putStrLn "Test 126, from line 542"
278 constTest (W.takeDirectory "/foo/bar/baz" == "/foo/bar")
279 putStrLn "Test 127, from line 542"
280 constTest (P.takeDirectory "/foo/bar/baz" == "/foo/bar")
281 putStrLn "Test 128, from line 543"
282 constTest (W.takeDirectory "/foo/bar/baz/" == "/foo/bar/baz")
283 putStrLn "Test 129, from line 543"
284 constTest (P.takeDirectory "/foo/bar/baz/" == "/foo/bar/baz")
285 putStrLn "Test 130, from line 544"
286 constTest (W.takeDirectory "foo/bar/baz" == "foo/bar")
287 putStrLn "Test 131, from line 544"
288 constTest (P.takeDirectory "foo/bar/baz" == "foo/bar")
289 putStrLn "Test 132, from line 545"
290 constTest (W.takeDirectory "foo\\bar" == "foo")
291 putStrLn "Test 133, from line 546"
292 constTest (W.takeDirectory "foo\\bar\\\\" == "foo\\bar")
293 putStrLn "Test 134, from line 547"
294 constTest (W.takeDirectory "C:\\" == "C:\\")
295 putStrLn "Test 135, from line 564"
296 constTest (P.combine "/" "test" == "/test")
297 putStrLn "Test 136, from line 565"
298 constTest (P.combine "home" "bob" == "home/bob")
299 putStrLn "Test 137, from line 566"
300 constTest (P.combine "x:" "foo" == "x:/foo")
301 putStrLn "Test 138, from line 567"
302 constTest (W.combine "C:\\foo" "bar" == "C:\\foo\\bar")
303 putStrLn "Test 139, from line 568"
304 constTest (W.combine "home" "bob" == "home\\bob")
305 putStrLn "Test 140, from line 571"
306 constTest (P.combine "home" "/bob" == "/bob")
307 putStrLn "Test 141, from line 572"
308 constTest (W.combine "home" "C:\\bob" == "C:\\bob")
309 putStrLn "Test 142, from line 580"
310 constTest (W.combine "home" "/bob" == "/bob")
311 putStrLn "Test 143, from line 581"
312 constTest (W.combine "home" "\\bob" == "\\bob")
313 putStrLn "Test 144, from line 582"
314 constTest (W.combine "C:\\home" "\\bob" == "\\bob")
315 putStrLn "Test 145, from line 589"
316 constTest (W.combine "D:\\foo" "C:bar" == "C:bar")
317 putStrLn "Test 146, from line 590"
318 constTest (W.combine "C:\\foo" "C:bar" == "C:bar")
319 putStrLn "Test 147, from line 613"
320 constTest (W.splitPath "test//item/" == [ "test//" , "item/" ])
321 putStrLn "Test 148, from line 613"
322 constTest (P.splitPath "test//item/" == [ "test//" , "item/" ])
323 putStrLn "Test 149, from line 614"
324 constTest (W.splitPath "test/item/file" == [ "test/" , "item/" , "file" ])
325 putStrLn "Test 150, from line 614"
326 constTest (P.splitPath "test/item/file" == [ "test/" , "item/" , "file" ])
327 block7 = do
328 putStrLn "Test 151, from line 615"
329 constTest (W.splitPath "" == [ ])
330 putStrLn "Test 152, from line 615"
331 constTest (P.splitPath "" == [ ])
332 putStrLn "Test 153, from line 616"
333 constTest (W.splitPath "c:\\test\\path" == [ "c:\\" , "test\\" , "path" ])
334 putStrLn "Test 154, from line 617"
335 constTest (P.splitPath "/file/test" == [ "/" , "file/" , "test" ])
336 putStrLn "Test 155, from line 631"
337 constTest (W.splitDirectories "test/file" == [ "test" , "file" ])
338 putStrLn "Test 156, from line 631"
339 constTest (P.splitDirectories "test/file" == [ "test" , "file" ])
340 putStrLn "Test 157, from line 632"
341 constTest (W.splitDirectories "/test/file" == [ "/" , "test" , "file" ])
342 putStrLn "Test 158, from line 632"
343 constTest (P.splitDirectories "/test/file" == [ "/" , "test" , "file" ])
344 putStrLn "Test 159, from line 633"
345 constTest (W.splitDirectories "C:\\test\\file" == [ "C:\\" , "test" , "file" ])
346 putStrLn "Test 160, from line 635"
347 constTest (W.splitDirectories "" == [ ])
348 putStrLn "Test 161, from line 635"
349 constTest (P.splitDirectories "" == [ ])
350 putStrLn "Test 162, from line 636"
351 constTest (W.splitDirectories "C:\\test\\\\\\file" == [ "C:\\" , "test" , "file" ])
352 putStrLn "Test 163, from line 637"
353 constTest (W.splitDirectories "/test///file" == [ "/" , "test" , "file" ])
354 putStrLn "Test 164, from line 637"
355 constTest (P.splitDirectories "/test///file" == [ "/" , "test" , "file" ])
356 putStrLn "Test 165, from line 645"
357 constTest (W.joinPath [ ] == "")
358 putStrLn "Test 166, from line 645"
359 constTest (P.joinPath [ ] == "")
360 putStrLn "Test 167, from line 646"
361 constTest (P.joinPath [ "test" , "file" , "path" ] == "test/file/path")
362 putStrLn "Test 168, from line 667"
363 constTest (W.equalFilePath "foo" "foo/")
364 putStrLn "Test 169, from line 667"
365 constTest (P.equalFilePath "foo" "foo/")
366 putStrLn "Test 170, from line 668"
367 constTest (not ( W.equalFilePath "foo" "/foo" ))
368 putStrLn "Test 171, from line 668"
369 constTest (not ( P.equalFilePath "foo" "/foo" ))
370 putStrLn "Test 172, from line 669"
371 constTest (not ( P.equalFilePath "foo" "FOO" ))
372 putStrLn "Test 173, from line 670"
373 constTest (W.equalFilePath "foo" "FOO")
374 putStrLn "Test 174, from line 671"
375 constTest (not ( W.equalFilePath "C:" "C:/" ))
376 putStrLn "Test 175, from line 686"
377 constTest (W.makeRelative "C:\\Home" "c:\\home\\bob" == "bob")
378 block8 = do
379 putStrLn "Test 176, from line 687"
380 constTest (W.makeRelative "C:\\Home" "c:/home/bob" == "bob")
381 putStrLn "Test 177, from line 688"
382 constTest (W.makeRelative "C:\\Home" "D:\\Home\\Bob" == "D:\\Home\\Bob")
383 putStrLn "Test 178, from line 689"
384 constTest (W.makeRelative "C:\\Home" "C:Home\\Bob" == "C:Home\\Bob")
385 putStrLn "Test 179, from line 690"
386 constTest (W.makeRelative "/Home" "/home/bob" == "bob")
387 putStrLn "Test 180, from line 691"
388 constTest (W.makeRelative "/" "//" == "//")
389 putStrLn "Test 181, from line 692"
390 constTest (P.makeRelative "/Home" "/home/bob" == "/home/bob")
391 putStrLn "Test 182, from line 693"
392 constTest (P.makeRelative "/home/" "/home/bob/foo/bar" == "bob/foo/bar")
393 putStrLn "Test 183, from line 694"
394 constTest (P.makeRelative "/fred" "bob" == "bob")
395 putStrLn "Test 184, from line 695"
396 constTest (P.makeRelative "/file/test" "/file/test/fred" == "fred")
397 putStrLn "Test 185, from line 696"
398 constTest (P.makeRelative "/file/test" "/file/test/fred/" == "fred/")
399 putStrLn "Test 186, from line 697"
400 constTest (P.makeRelative "some/path" "some/path/a/b/c" == "a/b/c")
401 putStrLn "Test 187, from line 727"
402 constTest (P.normalise "/file/\\test////" == "/file/\\test/")
403 putStrLn "Test 188, from line 728"
404 constTest (P.normalise "/file/./test" == "/file/test")
405 putStrLn "Test 189, from line 729"
406 constTest (P.normalise "/test/file/../bob/fred/" == "/test/file/../bob/fred/")
407 putStrLn "Test 190, from line 730"
408 constTest (P.normalise "../bob/fred/" == "../bob/fred/")
409 putStrLn "Test 191, from line 731"
410 constTest (P.normalise "./bob/fred/" == "bob/fred/")
411 putStrLn "Test 192, from line 732"
412 constTest (W.normalise "c:\\file/bob\\" == "C:\\file\\bob\\")
413 putStrLn "Test 193, from line 733"
414 constTest (W.normalise "c:\\" == "C:\\")
415 putStrLn "Test 194, from line 734"
416 constTest (W.normalise "C:.\\" == "C:")
417 putStrLn "Test 195, from line 735"
418 constTest (W.normalise "\\\\server\\test" == "\\\\server\\test")
419 putStrLn "Test 196, from line 736"
420 constTest (W.normalise "//server/test" == "\\\\server\\test")
421 putStrLn "Test 197, from line 737"
422 constTest (W.normalise "c:/file" == "C:\\file")
423 putStrLn "Test 198, from line 738"
424 constTest (W.normalise "/file" == "\\file")
425 putStrLn "Test 199, from line 739"
426 constTest (W.normalise "\\" == "\\")
427 putStrLn "Test 200, from line 740"
428 constTest (W.normalise "/./" == "\\")
429 block9 = do
430 putStrLn "Test 201, from line 741"
431 constTest (W.normalise "." == ".")
432 putStrLn "Test 202, from line 741"
433 constTest (P.normalise "." == ".")
434 putStrLn "Test 203, from line 742"
435 constTest (P.normalise "./" == "./")
436 putStrLn "Test 204, from line 743"
437 constTest (P.normalise "./." == "./")
438 putStrLn "Test 205, from line 744"
439 constTest (P.normalise "/./" == "/")
440 putStrLn "Test 206, from line 745"
441 constTest (P.normalise "/" == "/")
442 putStrLn "Test 207, from line 746"
443 constTest (P.normalise "bob/fred/." == "bob/fred/")
444 putStrLn "Test 208, from line 747"
445 constTest (P.normalise "//home" == "/home")
446 putStrLn "Test 209, from line 792"
447 constTest (W.isValid "" == False)
448 putStrLn "Test 210, from line 792"
449 constTest (P.isValid "" == False)
450 putStrLn "Test 211, from line 793"
451 constTest (P.isValid "/random_ path:*" == True)
452 putStrLn "Test 212, from line 795"
453 constTest (W.isValid "c:\\test" == True)
454 putStrLn "Test 213, from line 796"
455 constTest (W.isValid "c:\\test:of_test" == False)
456 putStrLn "Test 214, from line 797"
457 constTest (W.isValid "test*" == False)
458 putStrLn "Test 215, from line 798"
459 constTest (W.isValid "c:\\test\\nul" == False)
460 putStrLn "Test 216, from line 799"
461 constTest (W.isValid "c:\\test\\prn.txt" == False)
462 putStrLn "Test 217, from line 800"
463 constTest (W.isValid "c:\\nul\\file" == False)
464 putStrLn "Test 218, from line 801"
465 constTest (W.isValid "\\\\" == False)
466 putStrLn "Test 219, from line 802"
467 constTest (W.isValid "\\\\\\foo" == False)
468 putStrLn "Test 220, from line 803"
469 constTest (W.isValid "\\\\?\\D:file" == False)
470 putStrLn "Test 221, from line 821"
471 constTest (W.makeValid "" == "_")
472 putStrLn "Test 222, from line 821"
473 constTest (P.makeValid "" == "_")
474 putStrLn "Test 223, from line 822"
475 constTest (W.makeValid "c:\\already\\/valid" == "c:\\already\\/valid")
476 putStrLn "Test 224, from line 823"
477 constTest (W.makeValid "c:\\test:of_test" == "c:\\test_of_test")
478 putStrLn "Test 225, from line 824"
479 constTest (W.makeValid "test*" == "test_")
480 block10 = do
481 putStrLn "Test 226, from line 825"
482 constTest (W.makeValid "c:\\test\\nul" == "c:\\test\\nul_")
483 putStrLn "Test 227, from line 826"
484 constTest (W.makeValid "c:\\test\\prn.txt" == "c:\\test\\prn_.txt")
485 putStrLn "Test 228, from line 827"
486 constTest (W.makeValid "c:\\test/prn.txt" == "c:\\test/prn_.txt")
487 putStrLn "Test 229, from line 828"
488 constTest (W.makeValid "c:\\nul\\file" == "c:\\nul_\\file")
489 putStrLn "Test 230, from line 829"
490 constTest (W.makeValid "\\\\\\foo" == "\\\\drive")
491 putStrLn "Test 231, from line 830"
492 constTest (W.makeValid "\\\\?\\D:file" == "\\\\?\\D:\\file")
493 putStrLn "Test 232, from line 855"
494 constTest (W.isRelative "path\\test" == True)
495 putStrLn "Test 233, from line 856"
496 constTest (W.isRelative "c:\\test" == False)
497 putStrLn "Test 234, from line 857"
498 constTest (W.isRelative "c:test" == True)
499 putStrLn "Test 235, from line 858"
500 constTest (W.isRelative "c:\\" == False)
501 putStrLn "Test 236, from line 859"
502 constTest (W.isRelative "c:/" == False)
503 putStrLn "Test 237, from line 860"
504 constTest (W.isRelative "c:" == True)
505 putStrLn "Test 238, from line 861"
506 constTest (W.isRelative "\\\\foo" == False)
507 putStrLn "Test 239, from line 862"
508 constTest (W.isRelative "\\\\?\\foo" == False)
509 putStrLn "Test 240, from line 863"
510 constTest (W.isRelative "\\\\?\\UNC\\foo" == False)
511 putStrLn "Test 241, from line 864"
512 constTest (W.isRelative "/foo" == True)
513 putStrLn "Test 242, from line 865"
514 constTest (W.isRelative "\\foo" == True)
515 putStrLn "Test 243, from line 866"
516 constTest (P.isRelative "test/path" == True)
517 putStrLn "Test 244, from line 867"
518 constTest (P.isRelative "/test" == False)
519 putStrLn "Test 245, from line 868"
520 constTest (P.isRelative "/" == False)
521 putStrLn "Test 246, from line 137"
522 quickSafe (\ a -> (W.isPathSeparator a == ( a ` elem ` W.pathSeparators )))
523 putStrLn "Test 247, from line 137"
524 quickSafe (\ a -> (P.isPathSeparator a == ( a ` elem ` P.pathSeparators )))
525 putStrLn "Test 248, from line 151"
526 quickSafe (\ a -> (W.isSearchPathSeparator a == ( a == W.searchPathSeparator )))
527 putStrLn "Test 249, from line 151"
528 quickSafe (\ a -> (P.isSearchPathSeparator a == ( a == P.searchPathSeparator )))
529 putStrLn "Test 250, from line 164"
530 quickSafe (\ a -> (W.isExtSeparator a == ( a == W.extSeparator )))
531 block11 = do
532 putStrLn "Test 251, from line 164"
533 quickSafe (\ a -> (P.isExtSeparator a == ( a == P.extSeparator )))
534 putStrLn "Test 252, from line 204"
535 quickSafe (\ (QFilePath x) -> (uncurry ( ++ ) ( W.splitExtension x ) == x))
536 putStrLn "Test 253, from line 204"
537 quickSafe (\ (QFilePath x) -> (uncurry ( ++ ) ( P.splitExtension x ) == x))
538 putStrLn "Test 254, from line 205"
539 quickSafe (\ (QFilePath x) -> (uncurry W.addExtension ( W.splitExtension x ) == x))
540 putStrLn "Test 255, from line 205"
541 quickSafe (\ (QFilePath x) -> (uncurry P.addExtension ( P.splitExtension x ) == x))
542 putStrLn "Test 256, from line 223"
543 quickSafe (\ (QFilePath x) -> (W.takeExtension x == snd ( W.splitExtension x )))
544 putStrLn "Test 257, from line 223"
545 quickSafe (\ (QFilePath x) -> (P.takeExtension x == snd ( P.splitExtension x )))
546 putStrLn "Test 258, from line 224"
547 quickSafe (\ (QFilePath x) -> ((\ x -> W.takeExtension ( W.addExtension x "ext" ) == ".ext" ) ( W.makeValid x )))
548 putStrLn "Test 259, from line 224"
549 quickSafe (\ (QFilePath x) -> ((\ x -> P.takeExtension ( P.addExtension x "ext" ) == ".ext" ) ( P.makeValid x )))
550 putStrLn "Test 260, from line 225"
551 quickSafe (\ (QFilePath x) -> ((\ x -> W.takeExtension ( W.replaceExtension x "ext" ) == ".ext" ) ( W.makeValid x )))
552 putStrLn "Test 261, from line 225"
553 quickSafe (\ (QFilePath x) -> ((\ x -> P.takeExtension ( P.replaceExtension x "ext" ) == ".ext" ) ( P.makeValid x )))
554 putStrLn "Test 262, from line 245"
555 quickSafe (\ (QFilePath x) -> (W.dropExtension x == fst ( W.splitExtension x )))
556 putStrLn "Test 263, from line 245"
557 quickSafe (\ (QFilePath x) -> (P.dropExtension x == fst ( P.splitExtension x )))
558 putStrLn "Test 264, from line 256"
559 quickSafe (\ (QFilePath x) -> ((\ x -> W.takeFileName ( W.addExtension ( W.addTrailingPathSeparator x ) "ext" ) == ".ext" ) ( W.makeValid x )))
560 putStrLn "Test 265, from line 256"
561 quickSafe (\ (QFilePath x) -> ((\ x -> P.takeFileName ( P.addExtension ( P.addTrailingPathSeparator x ) "ext" ) == ".ext" ) ( P.makeValid x )))
562 putStrLn "Test 266, from line 269"
563 quickSafe (\ (QFilePath x) -> (null ( W.takeExtension x ) == not ( W.hasExtension x )))
564 putStrLn "Test 267, from line 269"
565 quickSafe (\ (QFilePath x) -> (null ( P.takeExtension x ) == not ( P.hasExtension x )))
566 putStrLn "Test 268, from line 276"
567 quickSafe (\ (QFilePath x) -> (uncurry ( ++ ) ( W.splitExtensions x ) == x))
568 putStrLn "Test 269, from line 276"
569 quickSafe (\ (QFilePath x) -> (uncurry ( ++ ) ( P.splitExtensions x ) == x))
570 putStrLn "Test 270, from line 277"
571 quickSafe (\ (QFilePath x) -> (uncurry W.addExtension ( W.splitExtensions x ) == x))
572 putStrLn "Test 271, from line 277"
573 quickSafe (\ (QFilePath x) -> (uncurry P.addExtension ( P.splitExtensions x ) == x))
574 putStrLn "Test 272, from line 287"
575 quickSafe (\ (QFilePath x) -> (not $ W.hasExtension ( W.dropExtensions x )))
576 putStrLn "Test 273, from line 287"
577 quickSafe (\ (QFilePath x) -> (not $ P.hasExtension ( P.dropExtensions x )))
578 putStrLn "Test 274, from line 311"
579 quickSafe (\ (QFilePath x) -> (uncurry ( ++ ) ( W.splitDrive x ) == x))
580 putStrLn "Test 275, from line 311"
581 quickSafe (\ (QFilePath x) -> (uncurry ( ++ ) ( P.splitDrive x ) == x))
582 block12 = do
583 putStrLn "Test 276, from line 380"
584 quickSafe (\ (QFilePath x) -> ((\ x -> uncurry W.joinDrive ( W.splitDrive x ) == x ) ( W.makeValid x )))
585 putStrLn "Test 277, from line 380"
586 quickSafe (\ (QFilePath x) -> ((\ x -> uncurry P.joinDrive ( P.splitDrive x ) == x ) ( P.makeValid x )))
587 putStrLn "Test 278, from line 390"
588 quickSafe (\ (QFilePath x) -> (W.takeDrive x == fst ( W.splitDrive x )))
589 putStrLn "Test 279, from line 390"
590 quickSafe (\ (QFilePath x) -> (P.takeDrive x == fst ( P.splitDrive x )))
591 putStrLn "Test 280, from line 396"
592 quickSafe (\ (QFilePath x) -> (W.dropDrive x == snd ( W.splitDrive x )))
593 putStrLn "Test 281, from line 396"
594 quickSafe (\ (QFilePath x) -> (P.dropDrive x == snd ( P.splitDrive x )))
595 putStrLn "Test 282, from line 402"
596 quickSafe (\ (QFilePath x) -> (not ( W.hasDrive x ) == null ( W.takeDrive x )))
597 putStrLn "Test 283, from line 402"
598 quickSafe (\ (QFilePath x) -> (not ( P.hasDrive x ) == null ( P.takeDrive x )))
599 putStrLn "Test 284, from line 428"
600 quickSafe (\ (QFilePath x) -> ((\ x -> uncurry ( W.</> ) ( W.splitFileName x ) == x || fst ( W.splitFileName x ) == "./" ) ( W.makeValid x )))
601 putStrLn "Test 285, from line 428"
602 quickSafe (\ (QFilePath x) -> ((\ x -> uncurry ( P.</> ) ( P.splitFileName x ) == x || fst ( P.splitFileName x ) == "./" ) ( P.makeValid x )))
603 putStrLn "Test 286, from line 429"
604 quickSafe (\ (QFilePath x) -> ((\ x -> W.isValid ( fst ( W.splitFileName x ) ) ) ( W.makeValid x )))
605 putStrLn "Test 287, from line 429"
606 quickSafe (\ (QFilePath x) -> ((\ x -> P.isValid ( fst ( P.splitFileName x ) ) ) ( P.makeValid x )))
607 putStrLn "Test 288, from line 454"
608 quickSafe (\ (QFilePath x) -> ((\ x -> W.replaceFileName x ( W.takeFileName x ) == x ) ( W.makeValid x )))
609 putStrLn "Test 289, from line 454"
610 quickSafe (\ (QFilePath x) -> ((\ x -> P.replaceFileName x ( P.takeFileName x ) == x ) ( P.makeValid x )))
611 putStrLn "Test 290, from line 460"
612 quickSafe (\ (QFilePath x) -> (W.dropFileName x == fst ( W.splitFileName x )))
613 putStrLn "Test 291, from line 460"
614 quickSafe (\ (QFilePath x) -> (P.dropFileName x == fst ( P.splitFileName x )))
615 putStrLn "Test 292, from line 468"
616 quickSafe (\ (QFilePath x) -> (W.takeFileName x ` isSuffixOf ` x))
617 putStrLn "Test 293, from line 468"
618 quickSafe (\ (QFilePath x) -> (P.takeFileName x ` isSuffixOf ` x))
619 putStrLn "Test 294, from line 469"
620 quickSafe (\ (QFilePath x) -> (W.takeFileName x == snd ( W.splitFileName x )))
621 putStrLn "Test 295, from line 469"
622 quickSafe (\ (QFilePath x) -> (P.takeFileName x == snd ( P.splitFileName x )))
623 putStrLn "Test 296, from line 470"
624 quickSafe (\ (QFilePath x) -> ((\ x -> W.takeFileName ( W.replaceFileName x "fred" ) == "fred" ) ( W.makeValid x )))
625 putStrLn "Test 297, from line 470"
626 quickSafe (\ (QFilePath x) -> ((\ x -> P.takeFileName ( P.replaceFileName x "fred" ) == "fred" ) ( P.makeValid x )))
627 putStrLn "Test 298, from line 471"
628 quickSafe (\ (QFilePath x) -> ((\ x -> W.takeFileName ( x W.</> "fred" ) == "fred" ) ( W.makeValid x )))
629 putStrLn "Test 299, from line 471"
630 quickSafe (\ (QFilePath x) -> ((\ x -> P.takeFileName ( x P.</> "fred" ) == "fred" ) ( P.makeValid x )))
631 putStrLn "Test 300, from line 472"
632 quickSafe (\ (QFilePath x) -> ((\ x -> W.isRelative ( W.takeFileName x ) ) ( W.makeValid x )))
633 block13 = do
634 putStrLn "Test 301, from line 472"
635 quickSafe (\ (QFilePath x) -> ((\ x -> P.isRelative ( P.takeFileName x ) ) ( P.makeValid x )))
636 putStrLn "Test 302, from line 482"
637 quickSafe (\ (QFilePath x) -> (W.takeBaseName ( W.addTrailingPathSeparator x ) == ""))
638 putStrLn "Test 303, from line 482"
639 quickSafe (\ (QFilePath x) -> (P.takeBaseName ( P.addTrailingPathSeparator x ) == ""))
640 putStrLn "Test 304, from line 492"
641 quickSafe (\ (QFilePath x) -> ((\ x -> W.replaceBaseName x ( W.takeBaseName x ) == x ) ( W.makeValid x )))
642 putStrLn "Test 305, from line 492"
643 quickSafe (\ (QFilePath x) -> ((\ x -> P.replaceBaseName x ( P.takeBaseName x ) == x ) ( P.makeValid x )))
644 putStrLn "Test 306, from line 515"
645 quickSafe (\ (QFilePath x) -> (W.hasTrailingPathSeparator ( W.addTrailingPathSeparator x )))
646 putStrLn "Test 307, from line 515"
647 quickSafe (\ (QFilePath x) -> (P.hasTrailingPathSeparator ( P.addTrailingPathSeparator x )))
648 putStrLn "Test 308, from line 516"
649 quickSafe (\ (QFilePath x) -> (W.hasTrailingPathSeparator x ==> W.addTrailingPathSeparator x == x))
650 putStrLn "Test 309, from line 516"
651 quickSafe (\ (QFilePath x) -> (P.hasTrailingPathSeparator x ==> P.addTrailingPathSeparator x == x))
652 putStrLn "Test 310, from line 527"
653 quickSafe (\ (QFilePath x) -> (not ( P.hasTrailingPathSeparator ( P.dropTrailingPathSeparator x ) ) || P.isDrive x))
654 putStrLn "Test 311, from line 538"
655 quickSafe (\ (QFilePath x) -> (W.takeDirectory x ` isPrefixOf ` x || W.takeDirectory x == "."))
656 putStrLn "Test 312, from line 538"
657 quickSafe (\ (QFilePath x) -> (P.takeDirectory x ` isPrefixOf ` x || P.takeDirectory x == "."))
658 putStrLn "Test 313, from line 553"
659 quickSafe (\ (QFilePath x) -> ((\ x -> W.replaceDirectory x ( W.takeDirectory x ) ` W.equalFilePath ` x ) ( W.makeValid x )))
660 putStrLn "Test 314, from line 553"
661 quickSafe (\ (QFilePath x) -> ((\ x -> P.replaceDirectory x ( P.takeDirectory x ) ` P.equalFilePath ` x ) ( P.makeValid x )))
662 putStrLn "Test 315, from line 561"
663 quickSafe (\ (QFilePath x) -> ((\ x -> W.combine ( W.takeDirectory x ) ( W.takeFileName x ) ` W.equalFilePath ` x ) ( W.makeValid x )))
664 putStrLn "Test 316, from line 561"
665 quickSafe (\ (QFilePath x) -> ((\ x -> P.combine ( P.takeDirectory x ) ( P.takeFileName x ) ` P.equalFilePath ` x ) ( P.makeValid x )))
666 putStrLn "Test 317, from line 612"
667 quickSafe (\ (QFilePath x) -> (concat ( W.splitPath x ) == x))
668 putStrLn "Test 318, from line 612"
669 quickSafe (\ (QFilePath x) -> (concat ( P.splitPath x ) == x))
670 putStrLn "Test 319, from line 634"
671 quickSafe (\ (QFilePath x) -> ((\ x -> W.joinPath ( W.splitDirectories x ) ` W.equalFilePath ` x ) ( W.makeValid x )))
672 putStrLn "Test 320, from line 634"
673 quickSafe (\ (QFilePath x) -> ((\ x -> P.joinPath ( P.splitDirectories x ) ` P.equalFilePath ` x ) ( P.makeValid x )))
674 putStrLn "Test 321, from line 644"
675 quickSafe (\ (QFilePath x) -> ((\ x -> W.joinPath ( W.splitPath x ) == x ) ( W.makeValid x )))
676 putStrLn "Test 322, from line 644"
677 quickSafe (\ (QFilePath x) -> ((\ x -> P.joinPath ( P.splitPath x ) == x ) ( P.makeValid x )))
678 putStrLn "Test 323, from line 665"
679 quickSafe (\ (QFilePath x) (QFilePath y) -> (x == y ==> W.equalFilePath x y))
680 putStrLn "Test 324, from line 665"
681 quickSafe (\ (QFilePath x) (QFilePath y) -> (x == y ==> P.equalFilePath x y))
682 putStrLn "Test 325, from line 666"
683 quickSafe (\ (QFilePath x) (QFilePath y) -> (W.normalise x == W.normalise y ==> W.equalFilePath x y))
684 block14 = do
685 putStrLn "Test 326, from line 666"
686 quickSafe (\ (QFilePath x) (QFilePath y) -> (P.normalise x == P.normalise y ==> P.equalFilePath x y))
687 putStrLn "Test 327, from line 684"
688 quickSafe (\ (QFilePath x) (QFilePath y) -> ((\ y -> (\ x -> W.equalFilePath x y || ( W.isRelative x && W.makeRelative y x == x ) || W.equalFilePath ( y W.</> W.makeRelative y x ) x ) ( W.makeValid x ) ) ( W.makeValid y )))
689 putStrLn "Test 328, from line 684"
690 quickSafe (\ (QFilePath x) (QFilePath y) -> ((\ y -> (\ x -> P.equalFilePath x y || ( P.isRelative x && P.makeRelative y x == x ) || P.equalFilePath ( y P.</> P.makeRelative y x ) x ) ( P.makeValid x ) ) ( P.makeValid y )))
691 putStrLn "Test 329, from line 685"
692 quickSafe (\ (QFilePath x) -> (W.makeRelative x x == "."))
693 putStrLn "Test 330, from line 685"
694 quickSafe (\ (QFilePath x) -> (P.makeRelative x x == "."))
695 putStrLn "Test 331, from line 794"
696 quickSafe (\ (QFilePath x) -> (P.isValid x == not ( null x )))
697 putStrLn "Test 332, from line 819"
698 quickSafe (\ (QFilePath x) -> (W.isValid ( W.makeValid x )))
699 putStrLn "Test 333, from line 819"
700 quickSafe (\ (QFilePath x) -> (P.isValid ( P.makeValid x )))
701 putStrLn "Test 334, from line 820"
702 quickSafe (\ (QFilePath x) -> (W.isValid x ==> W.makeValid x == x))
703 putStrLn "Test 335, from line 820"
704 quickSafe (\ (QFilePath x) -> (P.isValid x ==> P.makeValid x == x))
705 putStrLn "Test 336, from line 891"
706 quickSafe (\ (QFilePath x) -> (W.isAbsolute x == not ( W.isRelative x )))
707 putStrLn "Test 337, from line 891"
708 quickSafe (\ (QFilePath x) -> (P.isAbsolute x == not ( P.isRelative x )))