Add bin and edit workflow
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s

This commit is contained in:
2026-09-16 13:11:16 -06:00
parent c8ac4fcae5
commit 4cee170d66
17576 changed files with 895740 additions and 2 deletions
@@ -0,0 +1,64 @@
covers 'facets/argvector'
test_case Argvector do
method :parameters do
test do
line = "-x baz --foo=8 bar"
cargs = Argvector.new(line)
args, keys = cargs.parameters
args.assert == ['baz','bar']
keys.assert == {'foo'=>'8','x'=>true}
end
test "with arity" do
line = "-g a -x b -x c"
cargs = Argvector.new(line, :g=>1, :x=>1)
args, keys = cargs.parameters
keys.assert == {'g'=>'a','x'=>['b','c']}
args.assert == []
end
test "repeated option" do
line = "-x baz --foo=1 --foo=2 bar"
cargs = Argvector.new(line)
args, keys = cargs.parameters
args.assert == ['baz','bar']
keys.assert == {'x'=>true,'foo'=>['1','2']}
end
test do
line = "-q baz --aq 5 bar"
cargs = Argvector.new(line,'aq'=>1)
words, flags = cargs.parameters
words.assert == ['baz','bar']
flags.assert == {'q'=>true,'aq'=>'5'}
end
end
method :preoptions do
test do
line = "-x --foo=7 baz -y bar"
cargs = Argvector.new(line)
flags = cargs.preoptions
flags.assert == {'x'=>true,'foo'=>'7'}
end
end
method :flags do
test do
line = "-x baz --foo=8 bar"
cargs = Argvector.new(line)
flags = cargs.flags
flags.assert == ['x']
end
end
end