lean4-htt/tests/lean/filePath.lean.expected.out
Austin Letson 83369f3d9f
fix: update System.FilePath.parent to handle edge cases for absolute paths (#3645)
System.FilePath.parent did not return the correct parent path in the
case of absolute file paths

Example of previous behavior
```
(FilePath.mk "/foo").parent -> some (FilePath.mk "")

(System.FilePath.mk "/").parent -> some (FilePath.mk "")
```

The new behavior is based on rust's std::path::Path::parent function (as
previously described in comment in System.FilePath)

Example of updated behavior
```
(System.FilePath.mk "/foo").parent -> some (FilePath.mk "/")

(System.FilePath.mk "/").parent -> none
```

Behavior for relative file paths is unchanged

Closes #3618
2024-03-26 05:09:44 +00:00

28 lines
241 B
Text

true
false
"a/b"
"a/b/c"
"/b/c"
some "a"
some "a/b"
none
some "/a/b"
some "/"
some "/"
none
true
true
true
true
some "b"
some "b"
some "b.tar"
some ".gitignore"
"a/c"
none
some "txt"
none
"a/b.tar.xz"
"a/b.tar"
"a/b.tar.gz"
"a/b.tar.gz.bak"