#47, make isValid detect more invalid characters
[packages/filepath.git] / tests / TestGen.hs
1 -- GENERATED CODE: See ../Generate.hs
2 module TestGen(tests) where
3 import TestUtil
4 import qualified System.FilePath.Windows as W
5 import qualified System.FilePath.Posix as P
6 tests :: [(String, Test)]
7 tests =
8 [("W.pathSeparator == '\\\\'", test $ W.pathSeparator == '\\')
9 ,("P.pathSeparator == '/'", test $ P.pathSeparator == '/')
10 ,("P.isPathSeparator P.pathSeparator", test $ P.isPathSeparator P.pathSeparator)
11 ,("W.isPathSeparator W.pathSeparator", test $ W.isPathSeparator W.pathSeparator)
12 ,("W.pathSeparators == ['\\\\', '/']", test $ W.pathSeparators == ['\\', '/'])
13 ,("P.pathSeparators == ['/']", test $ P.pathSeparators == ['/'])
14 ,("P.pathSeparator `elem` P.pathSeparators", test $ P.pathSeparator `elem` P.pathSeparators)
15 ,("W.pathSeparator `elem` W.pathSeparators", test $ W.pathSeparator `elem` W.pathSeparators)
16 ,("P.isPathSeparator a == (a `elem` P.pathSeparators)", test $ \a -> P.isPathSeparator a == (a `elem` P.pathSeparators))
17 ,("W.isPathSeparator a == (a `elem` W.pathSeparators)", test $ \a -> W.isPathSeparator a == (a `elem` W.pathSeparators))
18 ,("W.searchPathSeparator == ';'", test $ W.searchPathSeparator == ';')
19 ,("P.searchPathSeparator == ':'", test $ P.searchPathSeparator == ':')
20 ,("P.isSearchPathSeparator a == (a == P.searchPathSeparator)", test $ \a -> P.isSearchPathSeparator a == (a == P.searchPathSeparator))
21 ,("W.isSearchPathSeparator a == (a == W.searchPathSeparator)", test $ \a -> W.isSearchPathSeparator a == (a == W.searchPathSeparator))
22 ,("P.extSeparator == '.'", test $ P.extSeparator == '.')
23 ,("W.extSeparator == '.'", test $ W.extSeparator == '.')
24 ,("P.isExtSeparator a == (a == P.extSeparator)", test $ \a -> P.isExtSeparator a == (a == P.extSeparator))
25 ,("W.isExtSeparator a == (a == W.extSeparator)", test $ \a -> W.isExtSeparator a == (a == W.extSeparator))
26 ,("P.splitSearchPath \"File1:File2:File3\" == [\"File1\", \"File2\", \"File3\"]", test $ P.splitSearchPath "File1:File2:File3" == ["File1", "File2", "File3"])
27 ,("P.splitSearchPath \"File1::File2:File3\" == [\"File1\", \".\", \"File2\", \"File3\"]", test $ P.splitSearchPath "File1::File2:File3" == ["File1", ".", "File2", "File3"])
28 ,("W.splitSearchPath \"File1;File2;File3\" == [\"File1\", \"File2\", \"File3\"]", test $ W.splitSearchPath "File1;File2;File3" == ["File1", "File2", "File3"])
29 ,("W.splitSearchPath \"File1;;File2;File3\" == [\"File1\", \"File2\", \"File3\"]", test $ W.splitSearchPath "File1;;File2;File3" == ["File1", "File2", "File3"])
30 ,("W.splitSearchPath \"File1;\\\"File2\\\";File3\" == [\"File1\", \"File2\", \"File3\"]", test $ W.splitSearchPath "File1;\"File2\";File3" == ["File1", "File2", "File3"])
31 ,("P.splitExtension \"/directory/path.ext\" == (\"/directory/path\", \".ext\")", test $ P.splitExtension "/directory/path.ext" == ("/directory/path", ".ext"))
32 ,("W.splitExtension \"/directory/path.ext\" == (\"/directory/path\", \".ext\")", test $ W.splitExtension "/directory/path.ext" == ("/directory/path", ".ext"))
33 ,("uncurry (++) (P.splitExtension x) == x", test $ \(QFilePath x) -> uncurry (++) (P.splitExtension x) == x)
34 ,("uncurry (++) (W.splitExtension x) == x", test $ \(QFilePath x) -> uncurry (++) (W.splitExtension x) == x)
35 ,("uncurry P.addExtension (P.splitExtension x) == x", test $ \(QFilePathValidP x) -> uncurry P.addExtension (P.splitExtension x) == x)
36 ,("uncurry W.addExtension (W.splitExtension x) == x", test $ \(QFilePathValidW x) -> uncurry W.addExtension (W.splitExtension x) == x)
37 ,("P.splitExtension \"file.txt\" == (\"file\", \".txt\")", test $ P.splitExtension "file.txt" == ("file", ".txt"))
38 ,("W.splitExtension \"file.txt\" == (\"file\", \".txt\")", test $ W.splitExtension "file.txt" == ("file", ".txt"))
39 ,("P.splitExtension \"file\" == (\"file\", \"\")", test $ P.splitExtension "file" == ("file", ""))
40 ,("W.splitExtension \"file\" == (\"file\", \"\")", test $ W.splitExtension "file" == ("file", ""))
41 ,("P.splitExtension \"file/file.txt\" == (\"file/file\", \".txt\")", test $ P.splitExtension "file/file.txt" == ("file/file", ".txt"))
42 ,("W.splitExtension \"file/file.txt\" == (\"file/file\", \".txt\")", test $ W.splitExtension "file/file.txt" == ("file/file", ".txt"))
43 ,("P.splitExtension \"file.txt/boris\" == (\"file.txt/boris\", \"\")", test $ P.splitExtension "file.txt/boris" == ("file.txt/boris", ""))
44 ,("W.splitExtension \"file.txt/boris\" == (\"file.txt/boris\", \"\")", test $ W.splitExtension "file.txt/boris" == ("file.txt/boris", ""))
45 ,("P.splitExtension \"file.txt/boris.ext\" == (\"file.txt/boris\", \".ext\")", test $ P.splitExtension "file.txt/boris.ext" == ("file.txt/boris", ".ext"))
46 ,("W.splitExtension \"file.txt/boris.ext\" == (\"file.txt/boris\", \".ext\")", test $ W.splitExtension "file.txt/boris.ext" == ("file.txt/boris", ".ext"))
47 ,("P.splitExtension \"file/path.txt.bob.fred\" == (\"file/path.txt.bob\", \".fred\")", test $ P.splitExtension "file/path.txt.bob.fred" == ("file/path.txt.bob", ".fred"))
48 ,("W.splitExtension \"file/path.txt.bob.fred\" == (\"file/path.txt.bob\", \".fred\")", test $ W.splitExtension "file/path.txt.bob.fred" == ("file/path.txt.bob", ".fred"))
49 ,("P.splitExtension \"file/path.txt/\" == (\"file/path.txt/\", \"\")", test $ P.splitExtension "file/path.txt/" == ("file/path.txt/", ""))
50 ,("W.splitExtension \"file/path.txt/\" == (\"file/path.txt/\", \"\")", test $ W.splitExtension "file/path.txt/" == ("file/path.txt/", ""))
51 ,("P.takeExtension \"/directory/path.ext\" == \".ext\"", test $ P.takeExtension "/directory/path.ext" == ".ext")
52 ,("W.takeExtension \"/directory/path.ext\" == \".ext\"", test $ W.takeExtension "/directory/path.ext" == ".ext")
53 ,("P.takeExtension x == snd (P.splitExtension x)", test $ \(QFilePath x) -> P.takeExtension x == snd (P.splitExtension x))
54 ,("W.takeExtension x == snd (W.splitExtension x)", test $ \(QFilePath x) -> W.takeExtension x == snd (W.splitExtension x))
55 ,("P.takeExtension (P.addExtension x \"ext\") == \".ext\"", test $ \(QFilePathValidP x) -> P.takeExtension (P.addExtension x "ext") == ".ext")
56 ,("W.takeExtension (W.addExtension x \"ext\") == \".ext\"", test $ \(QFilePathValidW x) -> W.takeExtension (W.addExtension x "ext") == ".ext")
57 ,("P.takeExtension (P.replaceExtension x \"ext\") == \".ext\"", test $ \(QFilePathValidP x) -> P.takeExtension (P.replaceExtension x "ext") == ".ext")
58 ,("W.takeExtension (W.replaceExtension x \"ext\") == \".ext\"", test $ \(QFilePathValidW x) -> W.takeExtension (W.replaceExtension x "ext") == ".ext")
59 ,("\"/directory/path.txt\" P.-<.> \"ext\" == \"/directory/path.ext\"", test $ "/directory/path.txt" P.-<.> "ext" == "/directory/path.ext")
60 ,("\"/directory/path.txt\" W.-<.> \"ext\" == \"/directory/path.ext\"", test $ "/directory/path.txt" W.-<.> "ext" == "/directory/path.ext")
61 ,("\"/directory/path.txt\" P.-<.> \".ext\" == \"/directory/path.ext\"", test $ "/directory/path.txt" P.-<.> ".ext" == "/directory/path.ext")
62 ,("\"/directory/path.txt\" W.-<.> \".ext\" == \"/directory/path.ext\"", test $ "/directory/path.txt" W.-<.> ".ext" == "/directory/path.ext")
63 ,("\"foo.o\" P.-<.> \"c\" == \"foo.c\"", test $ "foo.o" P.-<.> "c" == "foo.c")
64 ,("\"foo.o\" W.-<.> \"c\" == \"foo.c\"", test $ "foo.o" W.-<.> "c" == "foo.c")
65 ,("P.replaceExtension \"/directory/path.txt\" \"ext\" == \"/directory/path.ext\"", test $ P.replaceExtension "/directory/path.txt" "ext" == "/directory/path.ext")
66 ,("W.replaceExtension \"/directory/path.txt\" \"ext\" == \"/directory/path.ext\"", test $ W.replaceExtension "/directory/path.txt" "ext" == "/directory/path.ext")
67 ,("P.replaceExtension \"/directory/path.txt\" \".ext\" == \"/directory/path.ext\"", test $ P.replaceExtension "/directory/path.txt" ".ext" == "/directory/path.ext")
68 ,("W.replaceExtension \"/directory/path.txt\" \".ext\" == \"/directory/path.ext\"", test $ W.replaceExtension "/directory/path.txt" ".ext" == "/directory/path.ext")
69 ,("P.replaceExtension \"file.txt\" \".bob\" == \"file.bob\"", test $ P.replaceExtension "file.txt" ".bob" == "file.bob")
70 ,("W.replaceExtension \"file.txt\" \".bob\" == \"file.bob\"", test $ W.replaceExtension "file.txt" ".bob" == "file.bob")
71 ,("P.replaceExtension \"file.txt\" \"bob\" == \"file.bob\"", test $ P.replaceExtension "file.txt" "bob" == "file.bob")
72 ,("W.replaceExtension \"file.txt\" \"bob\" == \"file.bob\"", test $ W.replaceExtension "file.txt" "bob" == "file.bob")
73 ,("P.replaceExtension \"file\" \".bob\" == \"file.bob\"", test $ P.replaceExtension "file" ".bob" == "file.bob")
74 ,("W.replaceExtension \"file\" \".bob\" == \"file.bob\"", test $ W.replaceExtension "file" ".bob" == "file.bob")
75 ,("P.replaceExtension \"file.txt\" \"\" == \"file\"", test $ P.replaceExtension "file.txt" "" == "file")
76 ,("W.replaceExtension \"file.txt\" \"\" == \"file\"", test $ W.replaceExtension "file.txt" "" == "file")
77 ,("P.replaceExtension \"file.fred.bob\" \"txt\" == \"file.fred.txt\"", test $ P.replaceExtension "file.fred.bob" "txt" == "file.fred.txt")
78 ,("W.replaceExtension \"file.fred.bob\" \"txt\" == \"file.fred.txt\"", test $ W.replaceExtension "file.fred.bob" "txt" == "file.fred.txt")
79 ,("P.replaceExtension x y == P.addExtension (P.dropExtension x) y", test $ \(QFilePath x) (QFilePath y) -> P.replaceExtension x y == P.addExtension (P.dropExtension x) y)
80 ,("W.replaceExtension x y == W.addExtension (W.dropExtension x) y", test $ \(QFilePath x) (QFilePath y) -> W.replaceExtension x y == W.addExtension (W.dropExtension x) y)
81 ,("\"/directory/path\" P.<.> \"ext\" == \"/directory/path.ext\"", test $ "/directory/path" P.<.> "ext" == "/directory/path.ext")
82 ,("\"/directory/path\" W.<.> \"ext\" == \"/directory/path.ext\"", test $ "/directory/path" W.<.> "ext" == "/directory/path.ext")
83 ,("\"/directory/path\" P.<.> \".ext\" == \"/directory/path.ext\"", test $ "/directory/path" P.<.> ".ext" == "/directory/path.ext")
84 ,("\"/directory/path\" W.<.> \".ext\" == \"/directory/path.ext\"", test $ "/directory/path" W.<.> ".ext" == "/directory/path.ext")
85 ,("P.dropExtension \"/directory/path.ext\" == \"/directory/path\"", test $ P.dropExtension "/directory/path.ext" == "/directory/path")
86 ,("W.dropExtension \"/directory/path.ext\" == \"/directory/path\"", test $ W.dropExtension "/directory/path.ext" == "/directory/path")
87 ,("P.dropExtension x == fst (P.splitExtension x)", test $ \(QFilePath x) -> P.dropExtension x == fst (P.splitExtension x))
88 ,("W.dropExtension x == fst (W.splitExtension x)", test $ \(QFilePath x) -> W.dropExtension x == fst (W.splitExtension x))
89 ,("P.addExtension \"/directory/path\" \"ext\" == \"/directory/path.ext\"", test $ P.addExtension "/directory/path" "ext" == "/directory/path.ext")
90 ,("W.addExtension \"/directory/path\" \"ext\" == \"/directory/path.ext\"", test $ W.addExtension "/directory/path" "ext" == "/directory/path.ext")
91 ,("P.addExtension \"file.txt\" \"bib\" == \"file.txt.bib\"", test $ P.addExtension "file.txt" "bib" == "file.txt.bib")
92 ,("W.addExtension \"file.txt\" \"bib\" == \"file.txt.bib\"", test $ W.addExtension "file.txt" "bib" == "file.txt.bib")
93 ,("P.addExtension \"file.\" \".bib\" == \"file..bib\"", test $ P.addExtension "file." ".bib" == "file..bib")
94 ,("W.addExtension \"file.\" \".bib\" == \"file..bib\"", test $ W.addExtension "file." ".bib" == "file..bib")
95 ,("P.addExtension \"file\" \".bib\" == \"file.bib\"", test $ P.addExtension "file" ".bib" == "file.bib")
96 ,("W.addExtension \"file\" \".bib\" == \"file.bib\"", test $ W.addExtension "file" ".bib" == "file.bib")
97 ,("P.addExtension \"/\" \"x\" == \"/.x\"", test $ P.addExtension "/" "x" == "/.x")
98 ,("W.addExtension \"/\" \"x\" == \"/.x\"", test $ W.addExtension "/" "x" == "/.x")
99 ,("P.takeFileName (P.addExtension (P.addTrailingPathSeparator x) \"ext\") == \".ext\"", test $ \(QFilePathValidP x) -> P.takeFileName (P.addExtension (P.addTrailingPathSeparator x) "ext") == ".ext")
100 ,("W.takeFileName (W.addExtension (W.addTrailingPathSeparator x) \"ext\") == \".ext\"", test $ \(QFilePathValidW x) -> W.takeFileName (W.addExtension (W.addTrailingPathSeparator x) "ext") == ".ext")
101 ,("W.addExtension \"\\\\\\\\share\" \".txt\" == \"\\\\\\\\share\\\\.txt\"", test $ W.addExtension "\\\\share" ".txt" == "\\\\share\\.txt")
102 ,("P.hasExtension \"/directory/path.ext\" == True", test $ P.hasExtension "/directory/path.ext" == True)
103 ,("W.hasExtension \"/directory/path.ext\" == True", test $ W.hasExtension "/directory/path.ext" == True)
104 ,("P.hasExtension \"/directory/path\" == False", test $ P.hasExtension "/directory/path" == False)
105 ,("W.hasExtension \"/directory/path\" == False", test $ W.hasExtension "/directory/path" == False)
106 ,("null (P.takeExtension x) == not (P.hasExtension x)", test $ \(QFilePath x) -> null (P.takeExtension x) == not (P.hasExtension x))
107 ,("null (W.takeExtension x) == not (W.hasExtension x)", test $ \(QFilePath x) -> null (W.takeExtension x) == not (W.hasExtension x))
108 ,("P.splitExtensions \"/directory/path.ext\" == (\"/directory/path\", \".ext\")", test $ P.splitExtensions "/directory/path.ext" == ("/directory/path", ".ext"))
109 ,("W.splitExtensions \"/directory/path.ext\" == (\"/directory/path\", \".ext\")", test $ W.splitExtensions "/directory/path.ext" == ("/directory/path", ".ext"))
110 ,("P.splitExtensions \"file.tar.gz\" == (\"file\", \".tar.gz\")", test $ P.splitExtensions "file.tar.gz" == ("file", ".tar.gz"))
111 ,("W.splitExtensions \"file.tar.gz\" == (\"file\", \".tar.gz\")", test $ W.splitExtensions "file.tar.gz" == ("file", ".tar.gz"))
112 ,("uncurry (++) (P.splitExtensions x) == x", test $ \(QFilePath x) -> uncurry (++) (P.splitExtensions x) == x)
113 ,("uncurry (++) (W.splitExtensions x) == x", test $ \(QFilePath x) -> uncurry (++) (W.splitExtensions x) == x)
114 ,("uncurry P.addExtension (P.splitExtensions x) == x", test $ \(QFilePathValidP x) -> uncurry P.addExtension (P.splitExtensions x) == x)
115 ,("uncurry W.addExtension (W.splitExtensions x) == x", test $ \(QFilePathValidW x) -> uncurry W.addExtension (W.splitExtensions x) == x)
116 ,("P.splitExtensions \"file.tar.gz\" == (\"file\", \".tar.gz\")", test $ P.splitExtensions "file.tar.gz" == ("file", ".tar.gz"))
117 ,("W.splitExtensions \"file.tar.gz\" == (\"file\", \".tar.gz\")", test $ W.splitExtensions "file.tar.gz" == ("file", ".tar.gz"))
118 ,("P.dropExtensions \"/directory/path.ext\" == \"/directory/path\"", test $ P.dropExtensions "/directory/path.ext" == "/directory/path")
119 ,("W.dropExtensions \"/directory/path.ext\" == \"/directory/path\"", test $ W.dropExtensions "/directory/path.ext" == "/directory/path")
120 ,("P.dropExtensions \"file.tar.gz\" == \"file\"", test $ P.dropExtensions "file.tar.gz" == "file")
121 ,("W.dropExtensions \"file.tar.gz\" == \"file\"", test $ W.dropExtensions "file.tar.gz" == "file")
122 ,("not $ P.hasExtension $ P.dropExtensions x", test $ \(QFilePath x) -> not $ P.hasExtension $ P.dropExtensions x)
123 ,("not $ W.hasExtension $ W.dropExtensions x", test $ \(QFilePath x) -> not $ W.hasExtension $ W.dropExtensions x)
124 ,("not $ any P.isExtSeparator $ P.takeFileName $ P.dropExtensions x", test $ \(QFilePath x) -> not $ any P.isExtSeparator $ P.takeFileName $ P.dropExtensions x)
125 ,("not $ any W.isExtSeparator $ W.takeFileName $ W.dropExtensions x", test $ \(QFilePath x) -> not $ any W.isExtSeparator $ W.takeFileName $ W.dropExtensions x)
126 ,("P.takeExtensions \"/directory/path.ext\" == \".ext\"", test $ P.takeExtensions "/directory/path.ext" == ".ext")
127 ,("W.takeExtensions \"/directory/path.ext\" == \".ext\"", test $ W.takeExtensions "/directory/path.ext" == ".ext")
128 ,("P.takeExtensions \"file.tar.gz\" == \".tar.gz\"", test $ P.takeExtensions "file.tar.gz" == ".tar.gz")
129 ,("W.takeExtensions \"file.tar.gz\" == \".tar.gz\"", test $ W.takeExtensions "file.tar.gz" == ".tar.gz")
130 ,("uncurry (++) (P.splitDrive x) == x", test $ \(QFilePath x) -> uncurry (++) (P.splitDrive x) == x)
131 ,("uncurry (++) (W.splitDrive x) == x", test $ \(QFilePath x) -> uncurry (++) (W.splitDrive x) == x)
132 ,("W.splitDrive \"file\" == (\"\", \"file\")", test $ W.splitDrive "file" == ("", "file"))
133 ,("W.splitDrive \"c:/file\" == (\"c:/\", \"file\")", test $ W.splitDrive "c:/file" == ("c:/", "file"))
134 ,("W.splitDrive \"c:\\\\file\" == (\"c:\\\\\", \"file\")", test $ W.splitDrive "c:\\file" == ("c:\\", "file"))
135 ,("W.splitDrive \"\\\\\\\\shared\\\\test\" == (\"\\\\\\\\shared\\\\\", \"test\")", test $ W.splitDrive "\\\\shared\\test" == ("\\\\shared\\", "test"))
136 ,("W.splitDrive \"\\\\\\\\shared\" == (\"\\\\\\\\shared\", \"\")", test $ W.splitDrive "\\\\shared" == ("\\\\shared", ""))
137 ,("W.splitDrive \"\\\\\\\\?\\\\UNC\\\\shared\\\\file\" == (\"\\\\\\\\?\\\\UNC\\\\shared\\\\\", \"file\")", test $ W.splitDrive "\\\\?\\UNC\\shared\\file" == ("\\\\?\\UNC\\shared\\", "file"))
138 ,("W.splitDrive \"\\\\\\\\?\\\\UNCshared\\\\file\" == (\"\\\\\\\\?\\\\\", \"UNCshared\\\\file\")", test $ W.splitDrive "\\\\?\\UNCshared\\file" == ("\\\\?\\", "UNCshared\\file"))
139 ,("W.splitDrive \"\\\\\\\\?\\\\d:\\\\file\" == (\"\\\\\\\\?\\\\d:\\\\\", \"file\")", test $ W.splitDrive "\\\\?\\d:\\file" == ("\\\\?\\d:\\", "file"))
140 ,("W.splitDrive \"/d\" == (\"\", \"/d\")", test $ W.splitDrive "/d" == ("", "/d"))
141 ,("P.splitDrive \"/test\" == (\"/\", \"test\")", test $ P.splitDrive "/test" == ("/", "test"))
142 ,("P.splitDrive \"//test\" == (\"//\", \"test\")", test $ P.splitDrive "//test" == ("//", "test"))
143 ,("P.splitDrive \"test/file\" == (\"\", \"test/file\")", test $ P.splitDrive "test/file" == ("", "test/file"))
144 ,("P.splitDrive \"file\" == (\"\", \"file\")", test $ P.splitDrive "file" == ("", "file"))
145 ,("uncurry P.joinDrive (P.splitDrive x) == x", test $ \(QFilePathValidP x) -> uncurry P.joinDrive (P.splitDrive x) == x)
146 ,("uncurry W.joinDrive (W.splitDrive x) == x", test $ \(QFilePathValidW x) -> uncurry W.joinDrive (W.splitDrive x) == x)
147 ,("W.joinDrive \"C:\" \"foo\" == \"C:foo\"", test $ W.joinDrive "C:" "foo" == "C:foo")
148 ,("W.joinDrive \"C:\\\\\" \"bar\" == \"C:\\\\bar\"", test $ W.joinDrive "C:\\" "bar" == "C:\\bar")
149 ,("W.joinDrive \"\\\\\\\\share\" \"foo\" == \"\\\\\\\\share\\\\foo\"", test $ W.joinDrive "\\\\share" "foo" == "\\\\share\\foo")
150 ,("W.joinDrive \"/:\" \"foo\" == \"/:\\\\foo\"", test $ W.joinDrive "/:" "foo" == "/:\\foo")
151 ,("P.takeDrive x == fst (P.splitDrive x)", test $ \(QFilePath x) -> P.takeDrive x == fst (P.splitDrive x))
152 ,("W.takeDrive x == fst (W.splitDrive x)", test $ \(QFilePath x) -> W.takeDrive x == fst (W.splitDrive x))
153 ,("P.dropDrive x == snd (P.splitDrive x)", test $ \(QFilePath x) -> P.dropDrive x == snd (P.splitDrive x))
154 ,("W.dropDrive x == snd (W.splitDrive x)", test $ \(QFilePath x) -> W.dropDrive x == snd (W.splitDrive x))
155 ,("not (P.hasDrive x) == null (P.takeDrive x)", test $ \(QFilePath x) -> not (P.hasDrive x) == null (P.takeDrive x))
156 ,("not (W.hasDrive x) == null (W.takeDrive x)", test $ \(QFilePath x) -> not (W.hasDrive x) == null (W.takeDrive x))
157 ,("P.hasDrive \"/foo\" == True", test $ P.hasDrive "/foo" == True)
158 ,("W.hasDrive \"C:\\\\foo\" == True", test $ W.hasDrive "C:\\foo" == True)
159 ,("W.hasDrive \"C:foo\" == True", test $ W.hasDrive "C:foo" == True)
160 ,("P.hasDrive \"foo\" == False", test $ P.hasDrive "foo" == False)
161 ,("W.hasDrive \"foo\" == False", test $ W.hasDrive "foo" == False)
162 ,("P.hasDrive \"\" == False", test $ P.hasDrive "" == False)
163 ,("W.hasDrive \"\" == False", test $ W.hasDrive "" == False)
164 ,("P.isDrive \"/\" == True", test $ P.isDrive "/" == True)
165 ,("P.isDrive \"/foo\" == False", test $ P.isDrive "/foo" == False)
166 ,("W.isDrive \"C:\\\\\" == True", test $ W.isDrive "C:\\" == True)
167 ,("W.isDrive \"C:\\\\foo\" == False", test $ W.isDrive "C:\\foo" == False)
168 ,("P.isDrive \"\" == False", test $ P.isDrive "" == False)
169 ,("W.isDrive \"\" == False", test $ W.isDrive "" == False)
170 ,("P.splitFileName \"/directory/file.ext\" == (\"/directory/\", \"file.ext\")", test $ P.splitFileName "/directory/file.ext" == ("/directory/", "file.ext"))
171 ,("W.splitFileName \"/directory/file.ext\" == (\"/directory/\", \"file.ext\")", test $ W.splitFileName "/directory/file.ext" == ("/directory/", "file.ext"))
172 ,("uncurry (P.</>) (P.splitFileName x) == x || fst (P.splitFileName x) == \"./\"", test $ \(QFilePathValidP x) -> uncurry (P.</>) (P.splitFileName x) == x || fst (P.splitFileName x) == "./")
173 ,("uncurry (W.</>) (W.splitFileName x) == x || fst (W.splitFileName x) == \"./\"", test $ \(QFilePathValidW x) -> uncurry (W.</>) (W.splitFileName x) == x || fst (W.splitFileName x) == "./")
174 ,("P.isValid (fst (P.splitFileName x))", test $ \(QFilePathValidP x) -> P.isValid (fst (P.splitFileName x)))
175 ,("W.isValid (fst (W.splitFileName x))", test $ \(QFilePathValidW x) -> W.isValid (fst (W.splitFileName x)))
176 ,("P.splitFileName \"file/bob.txt\" == (\"file/\", \"bob.txt\")", test $ P.splitFileName "file/bob.txt" == ("file/", "bob.txt"))
177 ,("W.splitFileName \"file/bob.txt\" == (\"file/\", \"bob.txt\")", test $ W.splitFileName "file/bob.txt" == ("file/", "bob.txt"))
178 ,("P.splitFileName \"file/\" == (\"file/\", \"\")", test $ P.splitFileName "file/" == ("file/", ""))
179 ,("W.splitFileName \"file/\" == (\"file/\", \"\")", test $ W.splitFileName "file/" == ("file/", ""))
180 ,("P.splitFileName \"bob\" == (\"./\", \"bob\")", test $ P.splitFileName "bob" == ("./", "bob"))
181 ,("W.splitFileName \"bob\" == (\"./\", \"bob\")", test $ W.splitFileName "bob" == ("./", "bob"))
182 ,("P.splitFileName \"/\" == (\"/\", \"\")", test $ P.splitFileName "/" == ("/", ""))
183 ,("W.splitFileName \"c:\" == (\"c:\", \"\")", test $ W.splitFileName "c:" == ("c:", ""))
184 ,("P.replaceFileName \"/directory/other.txt\" \"file.ext\" == \"/directory/file.ext\"", test $ P.replaceFileName "/directory/other.txt" "file.ext" == "/directory/file.ext")
185 ,("W.replaceFileName \"/directory/other.txt\" \"file.ext\" == \"/directory/file.ext\"", test $ W.replaceFileName "/directory/other.txt" "file.ext" == "/directory/file.ext")
186 ,("P.replaceFileName x (P.takeFileName x) == x", test $ \(QFilePathValidP x) -> P.replaceFileName x (P.takeFileName x) == x)
187 ,("W.replaceFileName x (W.takeFileName x) == x", test $ \(QFilePathValidW x) -> W.replaceFileName x (W.takeFileName x) == x)
188 ,("P.dropFileName \"/directory/file.ext\" == \"/directory/\"", test $ P.dropFileName "/directory/file.ext" == "/directory/")
189 ,("W.dropFileName \"/directory/file.ext\" == \"/directory/\"", test $ W.dropFileName "/directory/file.ext" == "/directory/")
190 ,("P.dropFileName x == fst (P.splitFileName x)", test $ \(QFilePath x) -> P.dropFileName x == fst (P.splitFileName x))
191 ,("W.dropFileName x == fst (W.splitFileName x)", test $ \(QFilePath x) -> W.dropFileName x == fst (W.splitFileName x))
192 ,("P.takeFileName \"/directory/file.ext\" == \"file.ext\"", test $ P.takeFileName "/directory/file.ext" == "file.ext")
193 ,("W.takeFileName \"/directory/file.ext\" == \"file.ext\"", test $ W.takeFileName "/directory/file.ext" == "file.ext")
194 ,("P.takeFileName \"test/\" == \"\"", test $ P.takeFileName "test/" == "")
195 ,("W.takeFileName \"test/\" == \"\"", test $ W.takeFileName "test/" == "")
196 ,("P.takeFileName x `isSuffixOf` x", test $ \(QFilePath x) -> P.takeFileName x `isSuffixOf` x)
197 ,("W.takeFileName x `isSuffixOf` x", test $ \(QFilePath x) -> W.takeFileName x `isSuffixOf` x)
198 ,("P.takeFileName x == snd (P.splitFileName x)", test $ \(QFilePath x) -> P.takeFileName x == snd (P.splitFileName x))
199 ,("W.takeFileName x == snd (W.splitFileName x)", test $ \(QFilePath x) -> W.takeFileName x == snd (W.splitFileName x))
200 ,("P.takeFileName (P.replaceFileName x \"fred\") == \"fred\"", test $ \(QFilePathValidP x) -> P.takeFileName (P.replaceFileName x "fred") == "fred")
201 ,("W.takeFileName (W.replaceFileName x \"fred\") == \"fred\"", test $ \(QFilePathValidW x) -> W.takeFileName (W.replaceFileName x "fred") == "fred")
202 ,("P.takeFileName (x P.</> \"fred\") == \"fred\"", test $ \(QFilePathValidP x) -> P.takeFileName (x P.</> "fred") == "fred")
203 ,("W.takeFileName (x W.</> \"fred\") == \"fred\"", test $ \(QFilePathValidW x) -> W.takeFileName (x W.</> "fred") == "fred")
204 ,("P.isRelative (P.takeFileName x)", test $ \(QFilePathValidP x) -> P.isRelative (P.takeFileName x))
205 ,("W.isRelative (W.takeFileName x)", test $ \(QFilePathValidW x) -> W.isRelative (W.takeFileName x))
206 ,("P.takeBaseName \"/directory/file.ext\" == \"file\"", test $ P.takeBaseName "/directory/file.ext" == "file")
207 ,("W.takeBaseName \"/directory/file.ext\" == \"file\"", test $ W.takeBaseName "/directory/file.ext" == "file")
208 ,("P.takeBaseName \"file/test.txt\" == \"test\"", test $ P.takeBaseName "file/test.txt" == "test")
209 ,("W.takeBaseName \"file/test.txt\" == \"test\"", test $ W.takeBaseName "file/test.txt" == "test")
210 ,("P.takeBaseName \"dave.ext\" == \"dave\"", test $ P.takeBaseName "dave.ext" == "dave")
211 ,("W.takeBaseName \"dave.ext\" == \"dave\"", test $ W.takeBaseName "dave.ext" == "dave")
212 ,("P.takeBaseName \"\" == \"\"", test $ P.takeBaseName "" == "")
213 ,("W.takeBaseName \"\" == \"\"", test $ W.takeBaseName "" == "")
214 ,("P.takeBaseName \"test\" == \"test\"", test $ P.takeBaseName "test" == "test")
215 ,("W.takeBaseName \"test\" == \"test\"", test $ W.takeBaseName "test" == "test")
216 ,("P.takeBaseName (P.addTrailingPathSeparator x) == \"\"", test $ \(QFilePath x) -> P.takeBaseName (P.addTrailingPathSeparator x) == "")
217 ,("W.takeBaseName (W.addTrailingPathSeparator x) == \"\"", test $ \(QFilePath x) -> W.takeBaseName (W.addTrailingPathSeparator x) == "")
218 ,("P.takeBaseName \"file/file.tar.gz\" == \"file.tar\"", test $ P.takeBaseName "file/file.tar.gz" == "file.tar")
219 ,("W.takeBaseName \"file/file.tar.gz\" == \"file.tar\"", test $ W.takeBaseName "file/file.tar.gz" == "file.tar")
220 ,("P.replaceBaseName \"/directory/other.ext\" \"file\" == \"/directory/file.ext\"", test $ P.replaceBaseName "/directory/other.ext" "file" == "/directory/file.ext")
221 ,("W.replaceBaseName \"/directory/other.ext\" \"file\" == \"/directory/file.ext\"", test $ W.replaceBaseName "/directory/other.ext" "file" == "/directory/file.ext")
222 ,("P.replaceBaseName \"file/test.txt\" \"bob\" == \"file/bob.txt\"", test $ P.replaceBaseName "file/test.txt" "bob" == "file/bob.txt")
223 ,("W.replaceBaseName \"file/test.txt\" \"bob\" == \"file/bob.txt\"", test $ W.replaceBaseName "file/test.txt" "bob" == "file/bob.txt")
224 ,("P.replaceBaseName \"fred\" \"bill\" == \"bill\"", test $ P.replaceBaseName "fred" "bill" == "bill")
225 ,("W.replaceBaseName \"fred\" \"bill\" == \"bill\"", test $ W.replaceBaseName "fred" "bill" == "bill")
226 ,("P.replaceBaseName \"/dave/fred/bob.gz.tar\" \"new\" == \"/dave/fred/new.tar\"", test $ P.replaceBaseName "/dave/fred/bob.gz.tar" "new" == "/dave/fred/new.tar")
227 ,("W.replaceBaseName \"/dave/fred/bob.gz.tar\" \"new\" == \"/dave/fred/new.tar\"", test $ W.replaceBaseName "/dave/fred/bob.gz.tar" "new" == "/dave/fred/new.tar")
228 ,("P.replaceBaseName x (P.takeBaseName x) == x", test $ \(QFilePathValidP x) -> P.replaceBaseName x (P.takeBaseName x) == x)
229 ,("W.replaceBaseName x (W.takeBaseName x) == x", test $ \(QFilePathValidW x) -> W.replaceBaseName x (W.takeBaseName x) == x)
230 ,("P.hasTrailingPathSeparator \"test\" == False", test $ P.hasTrailingPathSeparator "test" == False)
231 ,("W.hasTrailingPathSeparator \"test\" == False", test $ W.hasTrailingPathSeparator "test" == False)
232 ,("P.hasTrailingPathSeparator \"test/\" == True", test $ P.hasTrailingPathSeparator "test/" == True)
233 ,("W.hasTrailingPathSeparator \"test/\" == True", test $ W.hasTrailingPathSeparator "test/" == True)
234 ,("P.hasTrailingPathSeparator (P.addTrailingPathSeparator x)", test $ \(QFilePath x) -> P.hasTrailingPathSeparator (P.addTrailingPathSeparator x))
235 ,("W.hasTrailingPathSeparator (W.addTrailingPathSeparator x)", test $ \(QFilePath x) -> W.hasTrailingPathSeparator (W.addTrailingPathSeparator x))
236 ,("P.hasTrailingPathSeparator x ==> P.addTrailingPathSeparator x == x", test $ \(QFilePath x) -> P.hasTrailingPathSeparator x ==> P.addTrailingPathSeparator x == x)
237 ,("W.hasTrailingPathSeparator x ==> W.addTrailingPathSeparator x == x", test $ \(QFilePath x) -> W.hasTrailingPathSeparator x ==> W.addTrailingPathSeparator x == x)
238 ,("P.addTrailingPathSeparator \"test/rest\" == \"test/rest/\"", test $ P.addTrailingPathSeparator "test/rest" == "test/rest/")
239 ,("P.dropTrailingPathSeparator \"file/test/\" == \"file/test\"", test $ P.dropTrailingPathSeparator "file/test/" == "file/test")
240 ,("W.dropTrailingPathSeparator \"file/test/\" == \"file/test\"", test $ W.dropTrailingPathSeparator "file/test/" == "file/test")
241 ,("P.dropTrailingPathSeparator \"/\" == \"/\"", test $ P.dropTrailingPathSeparator "/" == "/")
242 ,("W.dropTrailingPathSeparator \"/\" == \"/\"", test $ W.dropTrailingPathSeparator "/" == "/")
243 ,("W.dropTrailingPathSeparator \"\\\\\" == \"\\\\\"", test $ W.dropTrailingPathSeparator "\\" == "\\")
244 ,("not (P.hasTrailingPathSeparator (P.dropTrailingPathSeparator x)) || P.isDrive x", test $ \(QFilePath x) -> not (P.hasTrailingPathSeparator (P.dropTrailingPathSeparator x)) || P.isDrive x)
245 ,("P.takeDirectory \"/directory/other.ext\" == \"/directory\"", test $ P.takeDirectory "/directory/other.ext" == "/directory")
246 ,("W.takeDirectory \"/directory/other.ext\" == \"/directory\"", test $ W.takeDirectory "/directory/other.ext" == "/directory")
247 ,("P.takeDirectory x `isPrefixOf` x || P.takeDirectory x == \".\"", test $ \(QFilePath x) -> P.takeDirectory x `isPrefixOf` x || P.takeDirectory x == ".")
248 ,("W.takeDirectory x `isPrefixOf` x || W.takeDirectory x == \".\"", test $ \(QFilePath x) -> W.takeDirectory x `isPrefixOf` x || W.takeDirectory x == ".")
249 ,("P.takeDirectory \"foo\" == \".\"", test $ P.takeDirectory "foo" == ".")
250 ,("W.takeDirectory \"foo\" == \".\"", test $ W.takeDirectory "foo" == ".")
251 ,("P.takeDirectory \"/\" == \"/\"", test $ P.takeDirectory "/" == "/")
252 ,("W.takeDirectory \"/\" == \"/\"", test $ W.takeDirectory "/" == "/")
253 ,("P.takeDirectory \"/foo\" == \"/\"", test $ P.takeDirectory "/foo" == "/")
254 ,("W.takeDirectory \"/foo\" == \"/\"", test $ W.takeDirectory "/foo" == "/")
255 ,("P.takeDirectory \"/foo/bar/baz\" == \"/foo/bar\"", test $ P.takeDirectory "/foo/bar/baz" == "/foo/bar")
256 ,("W.takeDirectory \"/foo/bar/baz\" == \"/foo/bar\"", test $ W.takeDirectory "/foo/bar/baz" == "/foo/bar")
257 ,("P.takeDirectory \"/foo/bar/baz/\" == \"/foo/bar/baz\"", test $ P.takeDirectory "/foo/bar/baz/" == "/foo/bar/baz")
258 ,("W.takeDirectory \"/foo/bar/baz/\" == \"/foo/bar/baz\"", test $ W.takeDirectory "/foo/bar/baz/" == "/foo/bar/baz")
259 ,("P.takeDirectory \"foo/bar/baz\" == \"foo/bar\"", test $ P.takeDirectory "foo/bar/baz" == "foo/bar")
260 ,("W.takeDirectory \"foo/bar/baz\" == \"foo/bar\"", test $ W.takeDirectory "foo/bar/baz" == "foo/bar")
261 ,("W.takeDirectory \"foo\\\\bar\" == \"foo\"", test $ W.takeDirectory "foo\\bar" == "foo")
262 ,("W.takeDirectory \"foo\\\\bar\\\\\\\\\" == \"foo\\\\bar\"", test $ W.takeDirectory "foo\\bar\\\\" == "foo\\bar")
263 ,("W.takeDirectory \"C:\\\\\" == \"C:\\\\\"", test $ W.takeDirectory "C:\\" == "C:\\")
264 ,("P.replaceDirectory \"root/file.ext\" \"/directory/\" == \"/directory/file.ext\"", test $ P.replaceDirectory "root/file.ext" "/directory/" == "/directory/file.ext")
265 ,("W.replaceDirectory \"root/file.ext\" \"/directory/\" == \"/directory/file.ext\"", test $ W.replaceDirectory "root/file.ext" "/directory/" == "/directory/file.ext")
266 ,("P.replaceDirectory x (P.takeDirectory x) `P.equalFilePath` x", test $ \(QFilePathValidP x) -> P.replaceDirectory x (P.takeDirectory x) `P.equalFilePath` x)
267 ,("W.replaceDirectory x (W.takeDirectory x) `W.equalFilePath` x", test $ \(QFilePathValidW x) -> W.replaceDirectory x (W.takeDirectory x) `W.equalFilePath` x)
268 ,("\"/directory\" P.</> \"file.ext\" == \"/directory/file.ext\"", test $ "/directory" P.</> "file.ext" == "/directory/file.ext")
269 ,("\"/directory\" W.</> \"file.ext\" == \"/directory\\\\file.ext\"", test $ "/directory" W.</> "file.ext" == "/directory\\file.ext")
270 ,("\"directory\" P.</> \"/file.ext\" == \"/file.ext\"", test $ "directory" P.</> "/file.ext" == "/file.ext")
271 ,("\"directory\" W.</> \"/file.ext\" == \"/file.ext\"", test $ "directory" W.</> "/file.ext" == "/file.ext")
272 ,("(P.takeDirectory x P.</> P.takeFileName x) `P.equalFilePath` x", test $ \(QFilePathValidP x) -> (P.takeDirectory x P.</> P.takeFileName x) `P.equalFilePath` x)
273 ,("(W.takeDirectory x W.</> W.takeFileName x) `W.equalFilePath` x", test $ \(QFilePathValidW x) -> (W.takeDirectory x W.</> W.takeFileName x) `W.equalFilePath` x)
274 ,("\"/\" P.</> \"test\" == \"/test\"", test $ "/" P.</> "test" == "/test")
275 ,("\"home\" P.</> \"bob\" == \"home/bob\"", test $ "home" P.</> "bob" == "home/bob")
276 ,("\"x:\" P.</> \"foo\" == \"x:/foo\"", test $ "x:" P.</> "foo" == "x:/foo")
277 ,("\"C:\\\\foo\" W.</> \"bar\" == \"C:\\\\foo\\\\bar\"", test $ "C:\\foo" W.</> "bar" == "C:\\foo\\bar")
278 ,("\"home\" W.</> \"bob\" == \"home\\\\bob\"", test $ "home" W.</> "bob" == "home\\bob")
279 ,("\"home\" P.</> \"/bob\" == \"/bob\"", test $ "home" P.</> "/bob" == "/bob")
280 ,("\"home\" W.</> \"C:\\\\bob\" == \"C:\\\\bob\"", test $ "home" W.</> "C:\\bob" == "C:\\bob")
281 ,("\"home\" W.</> \"/bob\" == \"/bob\"", test $ "home" W.</> "/bob" == "/bob")
282 ,("\"home\" W.</> \"\\\\bob\" == \"\\\\bob\"", test $ "home" W.</> "\\bob" == "\\bob")
283 ,("\"C:\\\\home\" W.</> \"\\\\bob\" == \"\\\\bob\"", test $ "C:\\home" W.</> "\\bob" == "\\bob")
284 ,("\"D:\\\\foo\" W.</> \"C:bar\" == \"C:bar\"", test $ "D:\\foo" W.</> "C:bar" == "C:bar")
285 ,("\"C:\\\\foo\" W.</> \"C:bar\" == \"C:bar\"", test $ "C:\\foo" W.</> "C:bar" == "C:bar")
286 ,("P.splitPath \"/directory/file.ext\" == [\"/\", \"directory/\", \"file.ext\"]", test $ P.splitPath "/directory/file.ext" == ["/", "directory/", "file.ext"])
287 ,("W.splitPath \"/directory/file.ext\" == [\"/\", \"directory/\", \"file.ext\"]", test $ W.splitPath "/directory/file.ext" == ["/", "directory/", "file.ext"])
288 ,("concat (P.splitPath x) == x", test $ \(QFilePath x) -> concat (P.splitPath x) == x)
289 ,("concat (W.splitPath x) == x", test $ \(QFilePath x) -> concat (W.splitPath x) == x)
290 ,("P.splitPath \"test//item/\" == [\"test//\", \"item/\"]", test $ P.splitPath "test//item/" == ["test//", "item/"])
291 ,("W.splitPath \"test//item/\" == [\"test//\", \"item/\"]", test $ W.splitPath "test//item/" == ["test//", "item/"])
292 ,("P.splitPath \"test/item/file\" == [\"test/\", \"item/\", \"file\"]", test $ P.splitPath "test/item/file" == ["test/", "item/", "file"])
293 ,("W.splitPath \"test/item/file\" == [\"test/\", \"item/\", \"file\"]", test $ W.splitPath "test/item/file" == ["test/", "item/", "file"])
294 ,("P.splitPath \"\" == []", test $ P.splitPath "" == [])
295 ,("W.splitPath \"\" == []", test $ W.splitPath "" == [])
296 ,("W.splitPath \"c:\\\\test\\\\path\" == [\"c:\\\\\", \"test\\\\\", \"path\"]", test $ W.splitPath "c:\\test\\path" == ["c:\\", "test\\", "path"])
297 ,("P.splitPath \"/file/test\" == [\"/\", \"file/\", \"test\"]", test $ P.splitPath "/file/test" == ["/", "file/", "test"])
298 ,("P.splitDirectories \"/directory/file.ext\" == [\"/\", \"directory\", \"file.ext\"]", test $ P.splitDirectories "/directory/file.ext" == ["/", "directory", "file.ext"])
299 ,("W.splitDirectories \"/directory/file.ext\" == [\"/\", \"directory\", \"file.ext\"]", test $ W.splitDirectories "/directory/file.ext" == ["/", "directory", "file.ext"])
300 ,("P.splitDirectories \"test/file\" == [\"test\", \"file\"]", test $ P.splitDirectories "test/file" == ["test", "file"])
301 ,("W.splitDirectories \"test/file\" == [\"test\", \"file\"]", test $ W.splitDirectories "test/file" == ["test", "file"])
302 ,("P.splitDirectories \"/test/file\" == [\"/\", \"test\", \"file\"]", test $ P.splitDirectories "/test/file" == ["/", "test", "file"])
303 ,("W.splitDirectories \"/test/file\" == [\"/\", \"test\", \"file\"]", test $ W.splitDirectories "/test/file" == ["/", "test", "file"])
304 ,("W.splitDirectories \"C:\\\\test\\\\file\" == [\"C:\\\\\", \"test\", \"file\"]", test $ W.splitDirectories "C:\\test\\file" == ["C:\\", "test", "file"])
305 ,("P.joinPath (P.splitDirectories x) `P.equalFilePath` x", test $ \(QFilePathValidP x) -> P.joinPath (P.splitDirectories x) `P.equalFilePath` x)
306 ,("W.joinPath (W.splitDirectories x) `W.equalFilePath` x", test $ \(QFilePathValidW x) -> W.joinPath (W.splitDirectories x) `W.equalFilePath` x)
307 ,("P.splitDirectories \"\" == []", test $ P.splitDirectories "" == [])
308 ,("W.splitDirectories \"\" == []", test $ W.splitDirectories "" == [])
309 ,("W.splitDirectories \"C:\\\\test\\\\\\\\\\\\file\" == [\"C:\\\\\", \"test\", \"file\"]", test $ W.splitDirectories "C:\\test\\\\\\file" == ["C:\\", "test", "file"])
310 ,("P.splitDirectories \"/test///file\" == [\"/\", \"test\", \"file\"]", test $ P.splitDirectories "/test///file" == ["/", "test", "file"])
311 ,("W.splitDirectories \"/test///file\" == [\"/\", \"test\", \"file\"]", test $ W.splitDirectories "/test///file" == ["/", "test", "file"])
312 ,("P.joinPath [\"/\", \"directory/\", \"file.ext\"] == \"/directory/file.ext\"", test $ P.joinPath ["/", "directory/", "file.ext"] == "/directory/file.ext")
313 ,("W.joinPath [\"/\", \"directory/\", \"file.ext\"] == \"/directory/file.ext\"", test $ W.joinPath ["/", "directory/", "file.ext"] == "/directory/file.ext")
314 ,("P.joinPath (P.splitPath x) == x", test $ \(QFilePathValidP x) -> P.joinPath (P.splitPath x) == x)
315 ,("W.joinPath (W.splitPath x) == x", test $ \(QFilePathValidW x) -> W.joinPath (W.splitPath x) == x)
316 ,("P.joinPath [] == \"\"", test $ P.joinPath [] == "")
317 ,("W.joinPath [] == \"\"", test $ W.joinPath [] == "")
318 ,("P.joinPath [\"test\", \"file\", \"path\"] == \"test/file/path\"", test $ P.joinPath ["test", "file", "path"] == "test/file/path")
319 ,("x == y ==> P.equalFilePath x y", test $ \(QFilePath x) (QFilePath y) -> x == y ==> P.equalFilePath x y)
320 ,("x == y ==> W.equalFilePath x y", test $ \(QFilePath x) (QFilePath y) -> x == y ==> W.equalFilePath x y)
321 ,("P.normalise x == P.normalise y ==> P.equalFilePath x y", test $ \(QFilePath x) (QFilePath y) -> P.normalise x == P.normalise y ==> P.equalFilePath x y)
322 ,("W.normalise x == W.normalise y ==> W.equalFilePath x y", test $ \(QFilePath x) (QFilePath y) -> W.normalise x == W.normalise y ==> W.equalFilePath x y)
323 ,("P.equalFilePath \"foo\" \"foo/\"", test $ P.equalFilePath "foo" "foo/")
324 ,("W.equalFilePath \"foo\" \"foo/\"", test $ W.equalFilePath "foo" "foo/")
325 ,("not (P.equalFilePath \"foo\" \"/foo\")", test $ not (P.equalFilePath "foo" "/foo"))
326 ,("not (W.equalFilePath \"foo\" \"/foo\")", test $ not (W.equalFilePath "foo" "/foo"))
327 ,("not (P.equalFilePath \"foo\" \"FOO\")", test $ not (P.equalFilePath "foo" "FOO"))
328 ,("W.equalFilePath \"foo\" \"FOO\"", test $ W.equalFilePath "foo" "FOO")
329 ,("not (W.equalFilePath \"C:\" \"C:/\")", test $ not (W.equalFilePath "C:" "C:/"))
330 ,("P.makeRelative \"/directory\" \"/directory/file.ext\" == \"file.ext\"", test $ P.makeRelative "/directory" "/directory/file.ext" == "file.ext")
331 ,("W.makeRelative \"/directory\" \"/directory/file.ext\" == \"file.ext\"", test $ W.makeRelative "/directory" "/directory/file.ext" == "file.ext")
332 ,("P.makeRelative (P.takeDirectory x) x `P.equalFilePath` P.takeFileName x", test $ \(QFilePathValidP x) -> P.makeRelative (P.takeDirectory x) x `P.equalFilePath` P.takeFileName x)
333 ,("W.makeRelative (W.takeDirectory x) x `W.equalFilePath` W.takeFileName x", test $ \(QFilePathValidW x) -> W.makeRelative (W.takeDirectory x) x `W.equalFilePath` W.takeFileName x)
334 ,("P.makeRelative x x == \".\"", test $ \(QFilePath x) -> P.makeRelative x x == ".")
335 ,("W.makeRelative x x == \".\"", test $ \(QFilePath x) -> W.makeRelative x x == ".")
336 ,("P.equalFilePath x y || (P.isRelative x && P.makeRelative y x == x) || P.equalFilePath (y P.</> P.makeRelative y x) x", test $ \(QFilePathValidP x) (QFilePathValidP y) -> P.equalFilePath x y || (P.isRelative x && P.makeRelative y x == x) || P.equalFilePath (y P.</> P.makeRelative y x) x)
337 ,("W.equalFilePath x y || (W.isRelative x && W.makeRelative y x == x) || W.equalFilePath (y W.</> W.makeRelative y x) x", test $ \(QFilePathValidW x) (QFilePathValidW y) -> W.equalFilePath x y || (W.isRelative x && W.makeRelative y x == x) || W.equalFilePath (y W.</> W.makeRelative y x) x)
338 ,("W.makeRelative \"C:\\\\Home\" \"c:\\\\home\\\\bob\" == \"bob\"", test $ W.makeRelative "C:\\Home" "c:\\home\\bob" == "bob")
339 ,("W.makeRelative \"C:\\\\Home\" \"c:/home/bob\" == \"bob\"", test $ W.makeRelative "C:\\Home" "c:/home/bob" == "bob")
340 ,("W.makeRelative \"C:\\\\Home\" \"D:\\\\Home\\\\Bob\" == \"D:\\\\Home\\\\Bob\"", test $ W.makeRelative "C:\\Home" "D:\\Home\\Bob" == "D:\\Home\\Bob")
341 ,("W.makeRelative \"C:\\\\Home\" \"C:Home\\\\Bob\" == \"C:Home\\\\Bob\"", test $ W.makeRelative "C:\\Home" "C:Home\\Bob" == "C:Home\\Bob")
342 ,("W.makeRelative \"/Home\" \"/home/bob\" == \"bob\"", test $ W.makeRelative "/Home" "/home/bob" == "bob")
343 ,("W.makeRelative \"/\" \"//\" == \"//\"", test $ W.makeRelative "/" "//" == "//")
344 ,("P.makeRelative \"/Home\" \"/home/bob\" == \"/home/bob\"", test $ P.makeRelative "/Home" "/home/bob" == "/home/bob")
345 ,("P.makeRelative \"/home/\" \"/home/bob/foo/bar\" == \"bob/foo/bar\"", test $ P.makeRelative "/home/" "/home/bob/foo/bar" == "bob/foo/bar")
346 ,("P.makeRelative \"/fred\" \"bob\" == \"bob\"", test $ P.makeRelative "/fred" "bob" == "bob")
347 ,("P.makeRelative \"/file/test\" \"/file/test/fred\" == \"fred\"", test $ P.makeRelative "/file/test" "/file/test/fred" == "fred")
348 ,("P.makeRelative \"/file/test\" \"/file/test/fred/\" == \"fred/\"", test $ P.makeRelative "/file/test" "/file/test/fred/" == "fred/")
349 ,("P.makeRelative \"some/path\" \"some/path/a/b/c\" == \"a/b/c\"", test $ P.makeRelative "some/path" "some/path/a/b/c" == "a/b/c")
350 ,("P.normalise \"/file/\\\\test////\" == \"/file/\\\\test/\"", test $ P.normalise "/file/\\test////" == "/file/\\test/")
351 ,("P.normalise \"/file/./test\" == \"/file/test\"", test $ P.normalise "/file/./test" == "/file/test")
352 ,("P.normalise \"/test/file/../bob/fred/\" == \"/test/file/../bob/fred/\"", test $ P.normalise "/test/file/../bob/fred/" == "/test/file/../bob/fred/")
353 ,("P.normalise \"../bob/fred/\" == \"../bob/fred/\"", test $ P.normalise "../bob/fred/" == "../bob/fred/")
354 ,("P.normalise \"./bob/fred/\" == \"bob/fred/\"", test $ P.normalise "./bob/fred/" == "bob/fred/")
355 ,("W.normalise \"c:\\\\file/bob\\\\\" == \"C:\\\\file\\\\bob\\\\\"", test $ W.normalise "c:\\file/bob\\" == "C:\\file\\bob\\")
356 ,("W.normalise \"c:\\\\\" == \"C:\\\\\"", test $ W.normalise "c:\\" == "C:\\")
357 ,("W.normalise \"C:.\\\\\" == \"C:\"", test $ W.normalise "C:.\\" == "C:")
358 ,("W.normalise \"\\\\\\\\server\\\\test\" == \"\\\\\\\\server\\\\test\"", test $ W.normalise "\\\\server\\test" == "\\\\server\\test")
359 ,("W.normalise \"//server/test\" == \"\\\\\\\\server\\\\test\"", test $ W.normalise "//server/test" == "\\\\server\\test")
360 ,("W.normalise \"c:/file\" == \"C:\\\\file\"", test $ W.normalise "c:/file" == "C:\\file")
361 ,("W.normalise \"/file\" == \"\\\\file\"", test $ W.normalise "/file" == "\\file")
362 ,("W.normalise \"\\\\\" == \"\\\\\"", test $ W.normalise "\\" == "\\")
363 ,("W.normalise \"/./\" == \"\\\\\"", test $ W.normalise "/./" == "\\")
364 ,("P.normalise \".\" == \".\"", test $ P.normalise "." == ".")
365 ,("W.normalise \".\" == \".\"", test $ W.normalise "." == ".")
366 ,("P.normalise \"./\" == \"./\"", test $ P.normalise "./" == "./")
367 ,("P.normalise \"./.\" == \"./\"", test $ P.normalise "./." == "./")
368 ,("P.normalise \"/./\" == \"/\"", test $ P.normalise "/./" == "/")
369 ,("P.normalise \"/\" == \"/\"", test $ P.normalise "/" == "/")
370 ,("P.normalise \"bob/fred/.\" == \"bob/fred/\"", test $ P.normalise "bob/fred/." == "bob/fred/")
371 ,("P.normalise \"//home\" == \"/home\"", test $ P.normalise "//home" == "/home")
372 ,("P.isValid \"\" == False", test $ P.isValid "" == False)
373 ,("W.isValid \"\" == False", test $ W.isValid "" == False)
374 ,("P.isValid \"\\0\" == False", test $ P.isValid "\0" == False)
375 ,("W.isValid \"\\0\" == False", test $ W.isValid "\0" == False)
376 ,("P.isValid \"/random_ path:*\" == True", test $ P.isValid "/random_ path:*" == True)
377 ,("P.isValid x == not (null x)", test $ \(QFilePath x) -> P.isValid x == not (null x))
378 ,("W.isValid \"c:\\\\test\" == True", test $ W.isValid "c:\\test" == True)
379 ,("W.isValid \"c:\\\\test:of_test\" == False", test $ W.isValid "c:\\test:of_test" == False)
380 ,("W.isValid \"test*\" == False", test $ W.isValid "test*" == False)
381 ,("W.isValid \"c:\\\\test\\\\nul\" == False", test $ W.isValid "c:\\test\\nul" == False)
382 ,("W.isValid \"c:\\\\test\\\\prn.txt\" == False", test $ W.isValid "c:\\test\\prn.txt" == False)
383 ,("W.isValid \"c:\\\\nul\\\\file\" == False", test $ W.isValid "c:\\nul\\file" == False)
384 ,("W.isValid \"\\\\\\\\\" == False", test $ W.isValid "\\\\" == False)
385 ,("W.isValid \"\\\\\\\\\\\\foo\" == False", test $ W.isValid "\\\\\\foo" == False)
386 ,("W.isValid \"\\\\\\\\?\\\\D:file\" == False", test $ W.isValid "\\\\?\\D:file" == False)
387 ,("W.isValid \"foo\\tbar\" == False", test $ W.isValid "foo\tbar" == False)
388 ,("P.isValid (P.makeValid x)", test $ \(QFilePath x) -> P.isValid (P.makeValid x))
389 ,("W.isValid (W.makeValid x)", test $ \(QFilePath x) -> W.isValid (W.makeValid x))
390 ,("P.isValid x ==> P.makeValid x == x", test $ \(QFilePath x) -> P.isValid x ==> P.makeValid x == x)
391 ,("W.isValid x ==> W.makeValid x == x", test $ \(QFilePath x) -> W.isValid x ==> W.makeValid x == x)
392 ,("P.makeValid \"\" == \"_\"", test $ P.makeValid "" == "_")
393 ,("W.makeValid \"\" == \"_\"", test $ W.makeValid "" == "_")
394 ,("P.makeValid \"file\\0name\" == \"file_name\"", test $ P.makeValid "file\0name" == "file_name")
395 ,("W.makeValid \"file\\0name\" == \"file_name\"", test $ W.makeValid "file\0name" == "file_name")
396 ,("W.makeValid \"c:\\\\already\\\\/valid\" == \"c:\\\\already\\\\/valid\"", test $ W.makeValid "c:\\already\\/valid" == "c:\\already\\/valid")
397 ,("W.makeValid \"c:\\\\test:of_test\" == \"c:\\\\test_of_test\"", test $ W.makeValid "c:\\test:of_test" == "c:\\test_of_test")
398 ,("W.makeValid \"test*\" == \"test_\"", test $ W.makeValid "test*" == "test_")
399 ,("W.makeValid \"c:\\\\test\\\\nul\" == \"c:\\\\test\\\\nul_\"", test $ W.makeValid "c:\\test\\nul" == "c:\\test\\nul_")
400 ,("W.makeValid \"c:\\\\test\\\\prn.txt\" == \"c:\\\\test\\\\prn_.txt\"", test $ W.makeValid "c:\\test\\prn.txt" == "c:\\test\\prn_.txt")
401 ,("W.makeValid \"c:\\\\test/prn.txt\" == \"c:\\\\test/prn_.txt\"", test $ W.makeValid "c:\\test/prn.txt" == "c:\\test/prn_.txt")
402 ,("W.makeValid \"c:\\\\nul\\\\file\" == \"c:\\\\nul_\\\\file\"", test $ W.makeValid "c:\\nul\\file" == "c:\\nul_\\file")
403 ,("W.makeValid \"\\\\\\\\\\\\foo\" == \"\\\\\\\\drive\"", test $ W.makeValid "\\\\\\foo" == "\\\\drive")
404 ,("W.makeValid \"\\\\\\\\?\\\\D:file\" == \"\\\\\\\\?\\\\D:\\\\file\"", test $ W.makeValid "\\\\?\\D:file" == "\\\\?\\D:\\file")
405 ,("W.isRelative \"path\\\\test\" == True", test $ W.isRelative "path\\test" == True)
406 ,("W.isRelative \"c:\\\\test\" == False", test $ W.isRelative "c:\\test" == False)
407 ,("W.isRelative \"c:test\" == True", test $ W.isRelative "c:test" == True)
408 ,("W.isRelative \"c:\\\\\" == False", test $ W.isRelative "c:\\" == False)
409 ,("W.isRelative \"c:/\" == False", test $ W.isRelative "c:/" == False)
410 ,("W.isRelative \"c:\" == True", test $ W.isRelative "c:" == True)
411 ,("W.isRelative \"\\\\\\\\foo\" == False", test $ W.isRelative "\\\\foo" == False)
412 ,("W.isRelative \"\\\\\\\\?\\\\foo\" == False", test $ W.isRelative "\\\\?\\foo" == False)
413 ,("W.isRelative \"\\\\\\\\?\\\\UNC\\\\foo\" == False", test $ W.isRelative "\\\\?\\UNC\\foo" == False)
414 ,("W.isRelative \"/foo\" == True", test $ W.isRelative "/foo" == True)
415 ,("W.isRelative \"\\\\foo\" == True", test $ W.isRelative "\\foo" == True)
416 ,("P.isRelative \"test/path\" == True", test $ P.isRelative "test/path" == True)
417 ,("P.isRelative \"/test\" == False", test $ P.isRelative "/test" == False)
418 ,("P.isRelative \"/\" == False", test $ P.isRelative "/" == False)
419 ,("P.isAbsolute x == not (P.isRelative x)", test $ \(QFilePath x) -> P.isAbsolute x == not (P.isRelative x))
420 ,("W.isAbsolute x == not (W.isRelative x)", test $ \(QFilePath x) -> W.isAbsolute x == not (W.isRelative x))
421 ]