Add more test cases for path comparisons
This commit is contained in:
@@ -1545,6 +1545,20 @@ pub fn test_compare() {
|
|||||||
relative_from: Some("")
|
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",
|
tc!("foo/.", "foo",
|
||||||
eq: true,
|
eq: true,
|
||||||
starts_with: true,
|
starts_with: true,
|
||||||
@@ -1559,6 +1573,20 @@ pub fn test_compare() {
|
|||||||
relative_from: Some("")
|
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",
|
tc!("foo/bar", "foo",
|
||||||
eq: false,
|
eq: false,
|
||||||
starts_with: true,
|
starts_with: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user