Catch all will continue checking key chars when path chars differ

This commit is contained in:
silasb 2018-09-08 14:10:46 -04:00
parent 905bd9e14b
commit 1e410910e4
2 changed files with 10 additions and 0 deletions

View File

@ -442,6 +442,14 @@ module Radix
result.params["trailing"].empty?.should be_true
end
it "returns optional catch all globbing" do
tree = Tree(Symbol).new
tree.add "/members/*trailing", :members_catch_all
result = tree.find("/members2")
result.found?.should be_false
end
it "does not find when catch all is not full match" do
tree = Tree(Symbol).new
tree.add "/", :root

View File

@ -324,6 +324,8 @@ module Radix
return
end
end
return
end
# key still contains characters to walk