Add more test cases for path comparisons

This commit is contained in:
Zanie Blue 2024-07-02 23:12:06 -05:00 committed by The 8472
parent a7372372f6
commit dd509c7a63

View File

@ -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,