@@ -23,6 +23,7 @@ func TestAdjacentPrefix(t *testing.T) {
2323func TestTruncateURLPath (t * testing.T ) {
2424 testCases := [][2 ]string {
2525 {"/example/a/b/c/d/e/file.ext" , "/example/.../file.ext" },
26+ {"///example//merge/slashes///file.ext" , "/example/.../file.ext" },
2627 {"/example/a/b/c/d/e/dir/" , "/example/.../dir/" },
2728 {"/short/" , "/short/" },
2829 {"/short/file.ext" , "/short/file.ext" },
@@ -43,12 +44,14 @@ func TestTruncateURLPathLen(t *testing.T) {
4344 testCases := []testCase {
4445 {"/example/a/b/c/d/e/file.ext" , 30 , "/example/.../file.ext" },
4546 {"/example/a/b/c/d/e/dir/" , 30 , "/example/.../dir/" },
47+ {"///example//merge/slashes///dir/" , 30 , "/example/.../dir/" },
4648 {"/with/args/?a=1&b=2" , 30 , "/with/args/?..." },
4749 {"/with/args/?a=1&b=2" , 13 , "/with/args/?" },
4850 {"/with/args/?a=1&b=2" , 12 , "/with/args/?" },
4951 {"/with/args/?a=1&b=2" , 11 , "/with/args/" },
5052 {"/with/args/?a=1&b=2" , 8 , "/with/*/" },
5153 {"/with/args/?a=1&b=2" , 4 , "/wit" },
54+ {"///with//args/?a=1&b=2" , 4 , "/wit" },
5255
5356 {"/example/a/b/c/d/e/file.with.long.name.ext" , 30 , "/example/.../file.with.l...ext" },
5457 {"/example/file.with.very.long.name.ext" , 30 , "/example/file.with.very....ext" },
0 commit comments