| ... | ... | @@ -1131,12 +1131,23 @@ test "makepath relative walks" { |
| 1131 | 1131 | |
| 1132 | 1132 | try tmp.dir.makePath(relPath); |
| 1133 | 1133 | |
| 1134 | | // verify created directories exist: |
| 1135 | | try expectDir(tmp.dir, "first" ++ fs.path.sep_str ++ "A"); |
| 1136 | | try expectDir(tmp.dir, "first" ++ fs.path.sep_str ++ "B"); |
| 1137 | | try expectDir(tmp.dir, "first" ++ fs.path.sep_str ++ "C"); |
| 1138 | | try expectDir(tmp.dir, "second"); |
| 1139 | | try expectDir(tmp.dir, "third"); |
| 1134 | // How .. is handled is different on Windows than non-Windows |
| 1135 | switch (builtin.os.tag) { |
| 1136 | .windows => { |
| 1137 | // On Windows, .. is resolved before passing the path to NtCreateFile, |
| 1138 | // meaning everything except `first/C` drops out. |
| 1139 | try expectDir(tmp.dir, "first" ++ fs.path.sep_str ++ "C"); |
| 1140 | try testing.expectError(error.FileNotFound, tmp.dir.access("second", .{})); |
| 1141 | try testing.expectError(error.FileNotFound, tmp.dir.access("third", .{})); |
| 1142 | }, |
| 1143 | else => { |
| 1144 | try expectDir(tmp.dir, "first" ++ fs.path.sep_str ++ "A"); |
| 1145 | try expectDir(tmp.dir, "first" ++ fs.path.sep_str ++ "B"); |
| 1146 | try expectDir(tmp.dir, "first" ++ fs.path.sep_str ++ "C"); |
| 1147 | try expectDir(tmp.dir, "second"); |
| 1148 | try expectDir(tmp.dir, "third"); |
| 1149 | }, |
| 1150 | } |
| 1140 | 1151 | } |
| 1141 | 1152 | |
| 1142 | 1153 | test "makepath ignores '.'" { |