]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: shell: fix up redefine test case
authorFlorian Westphal <fw@strlen.de>
Fri, 4 Jan 2019 15:00:16 +0000 (16:00 +0100)
committerFlorian Westphal <fw@strlen.de>
Fri, 4 Jan 2019 15:05:43 +0000 (16:05 +0100)
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>
tests/shell/testcases/nft-f/0016redefines_1

index 9f6b56fef4bcc119eba06b1e688d6d62f7e55744..d0148d65da546ccd39a1e477df6393b96c60162c 100755 (executable)
@@ -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"