]> pilppa.org Git - uci.git/blobdiff - test/tests.d/020_get
Adds a unit test framework based on shunit2
[uci.git] / test / tests.d / 020_get
diff --git a/test/tests.d/020_get b/test/tests.d/020_get
new file mode 100644 (file)
index 0000000..6b6029a
--- /dev/null
@@ -0,0 +1,13 @@
+test_get_option()
+{
+       cp ${REF_DIR}/get.data ${CONFIG_DIR}/test
+       value=$($UCI get test.section.opt)
+       assertEquals 'val' "$value"
+}
+
+test_get_section()
+{
+       cp ${REF_DIR}/get.data ${CONFIG_DIR}/test
+       type=$($UCI get test.section)
+       assertEquals 'type' "$type"
+}