Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/freebsd/poudriere.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBryan Drewery <bryan@shatow.net>2019-12-09 22:46:20 +0300
committerBryan Drewery <bryan@shatow.net>2019-12-09 22:46:20 +0300
commitef658c9332646209f77be599e56d9a8189629fd2 (patch)
tree286a6b5c75478f9042d1c748f92d954f81d2eef4 /test
parentad8623e34bb641664f8748092d31c0473f217e4f (diff)
getvar: Adopt dteske's API
Diffstat (limited to 'test')
-rw-r--r--test/Makefile1
-rw-r--r--test/getvar.sh10
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"