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 result.params["trailing"].empty?.should be_true
end 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 it "does not find when catch all is not full match" do
tree = Tree(Symbol).new tree = Tree(Symbol).new
tree.add "/", :root tree.add "/", :root

View file

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