assertEquals 'val' "$value"
}
+test_get_option_multiline()
+{
+ cp ${REF_DIR}/get_multiline.data ${CONFIG_DIR}/test
+ value="$($UCI get test.section.opt)"
+ echo "$value"
+ assertEquals '"Hello, World.
+'\''' "$value"
+}
+
test_get_section()
{
cp ${REF_DIR}/get.data ${CONFIG_DIR}/test
assertSameFile ${REF_DIR}/set_nonexisting_option.result ${CHANGES_DIR}/set
}
+test_set_nonexisting_option_multiline()
+{
+ cp ${REF_DIR}/set_nonexisting_option.data ${CONFIG_DIR}/set
+ ${UCI} set set.section.opt="Hello,\'
+World\""
+ assertSameFile ${REF_DIR}/set_nonexisting_option_multiline.result ${CHANGES_DIR}/set
+}
+
test_set_existing_option()
{
cp ${REF_DIR}/set_existing_option.data ${CONFIG_DIR}/set
${UCI} set set.section.opt=val
assertSameFile ${REF_DIR}/set_existing_option.result ${CHANGES_DIR}/set
}
+
+test_set_existing_option_multiline()
+{
+ cp ${REF_DIR}/set_existing_option.data ${CONFIG_DIR}/set
+ ${UCI} set set.section.opt="Hello,\'
+World\""
+ assertSameFile ${REF_DIR}/set_existing_option_multiline.result ${CHANGES_DIR}/set
+}