tests: add test coverage for `uci batch' command.
[project/uci.git] / test / tests.d / 060_batch
diff --git a/test/tests.d/060_batch b/test/tests.d/060_batch
new file mode 100644 (file)
index 0000000..49d15e4
--- /dev/null
@@ -0,0 +1,17 @@
+test_batch_set()
+{
+       touch ${CONFIG_DIR}/batch_set
+
+        ${UCI} batch <<EOF
+set batch_set.SEC0='section'
+set batch_set.SEC0.option0='value0'
+set batch_set.SEC0.option1='"Hello,
+'"  World\""
+set batch_set.SEC1='section'
+set batch_set.SEC1.option0="value1"
+
+EOF
+       ${UCI} commit
+       assertSameFile "${REF_DIR}/batch_set.result" "${CONFIG_DIR}/batch_set"
+}
+