Added a test to see if it works

This commit is contained in:
Tristan Ancelet
2026-08-24 14:00:44 -05:00
parent 777a1b992a
commit fda58a2ff7
+6 -2
View File
@@ -217,7 +217,9 @@ module CliGen
# error message if caught # error message if caught
handle_flag_raises do handle_flag_raises do
if match.requires_arg? if match.requires_arg?
match.process(args.reject(&.processed?).take_while{|v| find_match(v.value) == CliGen::MatchType::NoMatch}) match.process(args.reject(&.processed?).take_while{|v|
find_match(v.value) == CliGen::MatchType::NoMatch || !!match.meta.options.try(&.includes?(v.value))
})
else else
match.process match.process
end end
@@ -258,7 +260,9 @@ module CliGen
## If this is the last flag provided in the clump do the thing ## If this is the last flag provided in the clump do the thing
if index == chars.size - 1 if index == chars.size - 1
if match.requires_arg? if match.requires_arg?
match.process(args.reject(&.processed?).take_while{|v| find_match(v.value) == CliGen::MatchType::NoMatch}) match.process(args.reject(&.processed?).take_while{|v|
find_match(v.value) == CliGen::MatchType::NoMatch || !! match.meta.options.try(&.includes?(v.value))
})
else else
match.process match.process
end end