Skip to content

Commit 87804fe

Browse files
committed
Add tests for trailing slash prefix-suffix conflict bug
Add test cases to unveil an issue where the order of adding routes like /x20/f{a}o/{*path} and /x20/f{a}o could result in a conflict. Signed-off-by: Changyuan Lyu <changyuanl@google.com>
1 parent 500698f commit 87804fe

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/insert.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,10 @@ fn prefix_suffix_conflict() {
257257
("/x16/prefix{a}suffix", Ok(())),
258258
("/x17/prefix{a}/z", Ok(())),
259259
("/x18/prefix{a}/z", Ok(())),
260+
("/x19/f{a}o", Ok(())),
261+
("/x19/f{a}o/{*path}", Ok(())),
262+
("/x20/f{a}o/{*path}", Ok(())),
263+
("/x20/f{a}o", Err(conflict("/x20/f{a}o/{*path}"))),
260264
])
261265
.run()
262266
}

0 commit comments

Comments
 (0)