summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2019-01-04 16:00:16 +0100
committerFlorian Westphal <fw@strlen.de>2019-01-04 16:05:43 +0100
commitcbf3e1a25c6cf56eb55bbe6ce0eecbf411c3fb8d (patch)
tree15946b220249cdb1006e6f6d225ddd1fab492c09
parent4d26b6dd3c4c8354a88c4a1aef8ea33229f0a4cc (diff)
tests: shell: fix up redefine test case
The '$' has to be escaped, else it gets replaced with an empty value by the shell. As 'set -e' is used, that caused the first nft command to fail. Signed-off-by: Florian Westphal <fw@strlen.de>
-rwxr-xr-xtests/shell/testcases/nft-f/0016redefines_112
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/shell/testcases/nft-f/0016redefines_1 b/tests/shell/testcases/nft-f/0016redefines_1
index 9f6b56fe..d0148d65 100755
--- a/tests/shell/testcases/nft-f/0016redefines_1
+++ b/tests/shell/testcases/nft-f/0016redefines_1
@@ -7,18 +7,18 @@ table ip x {
chain y {
define unused = 4.4.4.4
define address = { 1.1.1.1, 2.2.2.2 }
- ip saddr $address
+ ip saddr \$address
redefine address = { 3.3.3.3 }
- ip saddr $address
+ ip saddr \$address
undefine unused
}
}"
EXPECTED="table ip x {
- chain y {
- ip saddr { 1.1.1.1, 2.2.2.2 }
- ip saddr { 3.3.3.3 }
- }
+ chain y {
+ ip saddr { 1.1.1.1, 2.2.2.2 }
+ ip saddr { 3.3.3.3 }
+ }
}"
$NFT -f - <<< "$RULESET"