summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYousong Zhou <yszhou4tech@gmail.com>2015-01-24 23:07:50 +0800
committerFelix Fietkau <nbd@openwrt.org>2015-01-24 20:46:12 +0100
commit37930de695fbf183cd9eef8b33e428921efa7cc8 (patch)
tree8998bd036b27fe56420ee0dd0ff2c066aa199e3a
parentb121dd18280895cd57ba2b904acde614e13b6680 (diff)
downloaduci-37930de695fbf183cd9eef8b33e428921efa7cc8.tar.gz
tests: add test cases for showing nonexistent section and option.
Also fix the false error message about absence of uci-static. Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
-rw-r--r--test/tests.d/050_show3
-rw-r--r--test/tests.sh2
2 files changed, 4 insertions, 1 deletions
diff --git a/test/tests.d/050_show b/test/tests.d/050_show
index ce0eafc..161bae0 100644
--- a/test/tests.d/050_show
+++ b/test/tests.d/050_show
@@ -8,6 +8,9 @@ test_get_parsing()
assertFailWithNoReturn "${UCI_Q} show test.section.opt.val."
assertFailWithNoReturn "${UCI_Q} show test.section.opt.val.qsdf.qsd"
assertFailWithNoReturn "${UCI_Q} show test.section.opt.valqsqsd"
+ assertFailWithNoReturn "${UCI_Q} show test.nilsection"
+ assertFailWithNoReturn "${UCI_Q} show test.nilsection.nilopt"
+ assertFailWithNoReturn "${UCI_Q} show test.section.nilopt"
}
prepare_get_parsing_multiline() {
diff --git a/test/tests.sh b/test/tests.sh
index 0afccf0..ee72c31 100644
--- a/test/tests.sh
+++ b/test/tests.sh
@@ -8,7 +8,7 @@ FULL_SUITE=${TESTS_DIR}"/full_suite.sh"
UCI_BIN="../uci"
[ -x $UCI_BIN ] || {
- echo "uci-static is not present."
+ echo "uci is not present." >&2
return 1
}
UCI="${UCI_BIN} -c ${CONFIG_DIR} -p ${CHANGES_DIR}"