Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5ca124f

Browse files
zaniebthe8472
authored andcommittedJul 3, 2024
Add more test cases for path comparisons
1 parent 33bc557 commit 5ca124f

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
 

‎std/src/path/tests.rs

+28
Original file line numberDiff line numberDiff line change
@@ -1545,6 +1545,20 @@ pub fn test_compare() {
15451545
relative_from: Some("")
15461546
);
15471547

1548+
tc!("foo//", "foo",
1549+
eq: true,
1550+
starts_with: true,
1551+
ends_with: true,
1552+
relative_from: Some("")
1553+
);
1554+
1555+
tc!("foo///", "foo",
1556+
eq: true,
1557+
starts_with: true,
1558+
ends_with: true,
1559+
relative_from: Some("")
1560+
);
1561+
15481562
tc!("foo/.", "foo",
15491563
eq: true,
15501564
starts_with: true,
@@ -1559,6 +1573,20 @@ pub fn test_compare() {
15591573
relative_from: Some("")
15601574
);
15611575

1576+
tc!("foo/.//bar", "foo/bar",
1577+
eq: true,
1578+
starts_with: true,
1579+
ends_with: true,
1580+
relative_from: Some("")
1581+
);
1582+
1583+
tc!("foo//./bar", "foo/bar",
1584+
eq: true,
1585+
starts_with: true,
1586+
ends_with: true,
1587+
relative_from: Some("")
1588+
);
1589+
15621590
tc!("foo/bar", "foo",
15631591
eq: false,
15641592
starts_with: true,

0 commit comments

Comments
 (0)
Failed to load comments.