diff --git a/spec/radix/tree_spec.cr b/spec/radix/tree_spec.cr index 8545f7a..dcf058e 100644 --- a/spec/radix/tree_spec.cr +++ b/spec/radix/tree_spec.cr @@ -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 diff --git a/src/radix/tree.cr b/src/radix/tree.cr index 09d93fb..7c29d98 100644 --- a/src/radix/tree.cr +++ b/src/radix/tree.cr @@ -324,6 +324,8 @@ module Radix return end end + + return end # key still contains characters to walk