mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 22:12:15 +00:00
Add more test cases for path comparisons
This commit is contained in:
parent
a7372372f6
commit
dd509c7a63
@ -1545,6 +1545,20 @@ pub fn test_compare() {
|
||||
relative_from: Some("")
|
||||
);
|
||||
|
||||
tc!("foo//", "foo",
|
||||
eq: true,
|
||||
starts_with: true,
|
||||
ends_with: true,
|
||||
relative_from: Some("")
|
||||
);
|
||||
|
||||
tc!("foo///", "foo",
|
||||
eq: true,
|
||||
starts_with: true,
|
||||
ends_with: true,
|
||||
relative_from: Some("")
|
||||
);
|
||||
|
||||
tc!("foo/.", "foo",
|
||||
eq: true,
|
||||
starts_with: true,
|
||||
@ -1559,6 +1573,20 @@ pub fn test_compare() {
|
||||
relative_from: Some("")
|
||||
);
|
||||
|
||||
tc!("foo/.//bar", "foo/bar",
|
||||
eq: true,
|
||||
starts_with: true,
|
||||
ends_with: true,
|
||||
relative_from: Some("")
|
||||
);
|
||||
|
||||
tc!("foo//./bar", "foo/bar",
|
||||
eq: true,
|
||||
starts_with: true,
|
||||
ends_with: true,
|
||||
relative_from: Some("")
|
||||
);
|
||||
|
||||
tc!("foo/bar", "foo",
|
||||
eq: false,
|
||||
starts_with: true,
|
||||
|
Loading…
Reference in New Issue
Block a user