summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorGianni Ceccarelli <gianni.ceccarelli@broadbean.com>2023-07-26 14:01:38 +0100
committerGianni Ceccarelli <gianni.ceccarelli@broadbean.com>2023-07-26 14:01:38 +0100
commit11ee354df339d02a2940cfc91701836798bfe83a (patch)
tree72eedc8bce5a75e89781683b939286ca9f003e0a /t
parentvery rough parameter parser (diff)
downloadbash-object-system-11ee354df339d02a2940cfc91701836798bfe83a.tar.gz
bash-object-system-11ee354df339d02a2940cfc91701836798bfe83a.tar.bz2
bash-object-system-11ee354df339d02a2940cfc91701836798bfe83a.zip
simpler syntax for assoc assginments
Diffstat (limited to 't')
-rw-r--r--t/args.t5
1 files changed, 2 insertions, 3 deletions
diff --git a/t/args.t b/t/args.t
index 686adc6..363baae 100644
--- a/t/args.t
+++ b/t/args.t
@@ -16,18 +16,17 @@ bos-args/build-parser-code-into first_parser \
should-succeed "should build parser"
-diag "$first_parser"
-
declare -a array_var
declare -A assoc_var
eval "function first-parser() { $first_parser }"
-first-parser -two a -three x y -two b -one foo -three w z -unused
+first-parser -two a -three x=y -random -two b -one foo -three w=z -two -not-special- -unused inputs
is "$scalar_var" 'foo' 'scalar should be set'
is "${array_var[0]}" 'a' 'array should get first value'
is "${array_var[1]}" 'b' 'array should get second value'
+is "${array_var[2]}" '-not-special-' 'array should get not-special third value'
is "${assoc_var[x]}" 'y' 'assoc should get first value'
is "${assoc_var[w]}" 'z' 'assoc should get second value'