projects
/
project
/
uci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b52bdb
)
tests: add test case for parsing long option values.
author
Yousong Zhou
<
[email protected]
>
Mon, 25 May 2015 12:32:43 +0000
(20:32 +0800)
committer
Felix Fietkau
<
[email protected]
>
Mon, 25 May 2015 21:03:30 +0000
(23:03 +0200)
Signed-off-by: Yousong Zhou <
[email protected]
>
test/tests.d/070_revert
patch
|
blob
|
history
diff --git
a/test/tests.d/070_revert
b/test/tests.d/070_revert
index 6035f6f2cd4370ce280fd5702c47a2a63ffe9d5a..fc9f5f35935785ad0921341c19059c6c3bc1d698 100644
(file)
--- a/
test/tests.d/070_revert
+++ b/
test/tests.d/070_revert
@@
-26,3
+26,22
@@
test_revert_option_multiline()
${UCI} revert revert.SEC0.option1
assertSameFile "${REF_DIR}/revert_option_multiline.result" "$CHANGES_DIR/revert"
}
+
+test_revert_option_long()
+{
+ local val="$(head -c 8192 < /dev/zero | tr '\0' 'a')"
+ local res
+
+ touch ${CONFIG_DIR}/p
+
+ ${UCI} set p.s=sec
+ ${UCI} set p.s.o="$val"
+
+ res="$(${UCI} changes)"
+ assertEquals "p.s='sec'
+p.s.o='$val'" "$res"
+
+ ${UCI} revert p
+ res="$(${UCI} changes)"
+ assertEquals "" "$res"
+}