]> pilppa.com Git - uci.git/commitdiff
test: do not print expected error messages
authorFelix Fietkau <nbd@openwrt.org>
Fri, 4 Sep 2009 22:45:12 +0000 (00:45 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 4 Sep 2009 22:45:12 +0000 (00:45 +0200)
test/tests.d/020_get
test/tests.d/030_set
test/tests.d/050_show
test/tests.sh

index 7c365f3dd515842edfa1a37476c8ee2d3cd5cd40..ad19264a83f0b3516255438bac0e7155c4c70d0d 100644 (file)
@@ -2,26 +2,26 @@ test_get_parsing()
 {
        cp ${REF_DIR}/get_parsing.data ${CONFIG_DIR}/test
 
-       assertFailWithNoReturn "${UCI} get test."
-       assertFailWithNoReturn "${UCI} get test.section."
-       assertFailWithNoReturn "${UCI} get test.section.opt."
-       assertFailWithNoReturn "${UCI} get test.section.opt.val."
-       assertFailWithNoReturn "${UCI} get test.section.opt.val.qsdf.qsd"
-       assertFailWithNoReturn "${UCI} get test.section.opt.valqsqsd"
+       assertFailWithNoReturn "${UCI_Q} get test."
+       assertFailWithNoReturn "${UCI_Q} get test.section."
+       assertFailWithNoReturn "${UCI_Q} get test.section.opt."
+       assertFailWithNoReturn "${UCI_Q} get test.section.opt.val."
+       assertFailWithNoReturn "${UCI_Q} get test.section.opt.val.qsdf.qsd"
+       assertFailWithNoReturn "${UCI_Q} get test.section.opt.valqsqsd"
 }
 
 test_get_section_index_parsing()
 {
        cp ${REF_DIR}/get_parsing.data ${CONFIG_DIR}/test
 
-       assertFailWithNoReturn "${UCI} get test.@"
-       assertFailWithNoReturn "${UCI} get test.@zer."
-       assertFailWithNoReturn "${UCI} get test.@."
-       assertFailWithNoReturn "${UCI} get test.@zer[1]"
-       assertFailWithNoReturn "${UCI} get test.@.opt"
-       assertFailWithNoReturn "${UCI} get test.@[28]"
-       assertFailWithNoReturn "${UCI} get test.@[1]."
-       assertFailWithNoReturn "${UCI} get test.@[1].val."
+       assertFailWithNoReturn "${UCI_Q} get test.@"
+       assertFailWithNoReturn "${UCI_Q} get test.@zer."
+       assertFailWithNoReturn "${UCI_Q} get test.@."
+       assertFailWithNoReturn "${UCI_Q} get test.@zer[1]"
+       assertFailWithNoReturn "${UCI_Q} get test.@.opt"
+       assertFailWithNoReturn "${UCI_Q} get test.@[28]"
+       assertFailWithNoReturn "${UCI_Q} get test.@[1]."
+       assertFailWithNoReturn "${UCI_Q} get test.@[1].val."
 }
 
 test_get_option()
index 137a955f2d05f5a1135233432f8d814da508bdad..9d2ff4b990e1e5e9c37123a22cd6eb1522418549 100644 (file)
@@ -2,10 +2,10 @@ test_set_parsing()
 {
        cp ${REF_DIR}/set_parsing.data ${CONFIG_DIR}/test
 
-       assertFailWithNoReturn "${UCI} set test.=val"
-       assertFailWithNoReturn "${UCI} set test.section.=val"
-       assertFailWithNoReturn "${UCI} set test.section.opt.=val"
-       assertFailWithNoReturn "${UCI} set test.section.opt.zflk=val"
+       assertFailWithNoReturn "${UCI_Q} set test.=val"
+       assertFailWithNoReturn "${UCI_Q} set test.section.=val"
+       assertFailWithNoReturn "${UCI_Q} set test.section.opt.=val"
+       assertFailWithNoReturn "${UCI_Q} set test.section.opt.zflk=val"
 }
 
 test_set_named_section()
index 2c4665e805e35ec2f9f624387c24563b8854283b..7d7e1602724ecf3d893f27deadb8ddf631bfcec6 100644 (file)
@@ -2,10 +2,10 @@ test_get_parsing()
 {
        cp ${REF_DIR}/show_parsing.data ${CONFIG_DIR}/test
 
-       assertFailWithNoReturn "${UCI} show test."
-       assertFailWithNoReturn "${UCI} show test.section."
-       assertFailWithNoReturn "${UCI} show test.section.opt."
-       assertFailWithNoReturn "${UCI} show test.section.opt.val."
-       assertFailWithNoReturn "${UCI} show test.section.opt.val.qsdf.qsd"
-       assertFailWithNoReturn "${UCI} show test.section.opt.valqsqsd"
+       assertFailWithNoReturn "${UCI_Q} show test."
+       assertFailWithNoReturn "${UCI_Q} show test.section."
+       assertFailWithNoReturn "${UCI_Q} show test.section.opt."
+       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"
 }
index 15a4744a152e6448ed5a18249eca9ec45e20ac8f..95be84c6c7875458c9c2ec59251920ba4d377c11 100644 (file)
@@ -12,6 +12,7 @@ UCI_STATIC="../uci-static"
        return 1
 }
 UCI="${UCI_STATIC} -c ${CONFIG_DIR} -p ${CHANGES_DIR}"
+UCI_Q="${UCI_STATIC} -c ${CONFIG_DIR} -p ${CHANGES_DIR} -q"
 
 REF_DIR="./references"
 SCRIPTS_DIR="./tests.d"
@@ -71,6 +72,7 @@ CONFIG_DIR="${CONFIG_DIR}" \
 CHANGES_DIR="${CHANGES_DIR}" \
 TMP_DIR="${TMP_DIR}" \
 UCI="${UCI}" \
+UCI_Q="${UCI_Q}" \
 /bin/sh ${FULL_SUITE}
 
 rm -rf ${TESTS_DIR}