--- /dev/null
+revert_test_prepare() {
+ touch ${CONFIG_DIR}/revert
+ ${UCI} set revert.SEC0=section
+ ${UCI} set revert.SEC0.option0=value0
+ ${UCI} set revert.SEC0.option1='"Hello,
+'" World\""
+}
+
+test_revert_section()
+{
+ revert_test_prepare
+ ${UCI} revert revert.SEC0
+ assertSameFile "${REF_DIR}/revert_section.result" "$CHANGES_DIR/revert"
+}
+
+test_revert_option()
+{
+ revert_test_prepare
+ ${UCI} revert revert.SEC0.option0
+ assertSameFile "${REF_DIR}/revert_option.result" "$CHANGES_DIR/revert"
+}
+
+test_revert_option_multiline()
+{
+ revert_test_prepare
+ ${UCI} revert revert.SEC0.option1
+ assertSameFile "${REF_DIR}/revert_option_multiline.result" "$CHANGES_DIR/revert"
+}