diff options
author | Bryan Drewery <bryan@shatow.net> | 2019-12-09 22:46:20 +0300 |
---|---|---|
committer | Bryan Drewery <bryan@shatow.net> | 2019-12-09 22:46:20 +0300 |
commit | ef658c9332646209f77be599e56d9a8189629fd2 (patch) | |
tree | 286a6b5c75478f9042d1c748f92d954f81d2eef4 /test | |
parent | ad8623e34bb641664f8748092d31c0473f217e4f (diff) |
getvar: Adopt dteske's API
Diffstat (limited to 'test')
-rw-r--r-- | test/Makefile | 1 | ||||
-rw-r--r-- | test/getvar.sh | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/test/Makefile b/test/Makefile index d018b8bc..d8eed762 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,6 +1,7 @@ TESTS=\ cache.sh \ encode_args.sh \ + getvar.sh \ hash_basic.sh \ list.sh \ locks.sh \ diff --git a/test/getvar.sh b/test/getvar.sh new file mode 100644 index 00000000..c29b5076 --- /dev/null +++ b/test/getvar.sh @@ -0,0 +1,10 @@ +#! /bin/sh + +. common.sh +. ${SCRIPTPREFIX}/common.sh + +foo="1 2 \$3" +getvar foo output +assert "${foo}" "${output}" "1. foo doesn't match" + +assert "${foo}" "$(getvar foo)" "2. foo doesn't match" |