summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/nft-f/0030variable_reuse_0
diff options
context:
space:
mode:
Diffstat (limited to 'tests/shell/testcases/nft-f/0030variable_reuse_0')
-rwxr-xr-xtests/shell/testcases/nft-f/0030variable_reuse_019
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/shell/testcases/nft-f/0030variable_reuse_0 b/tests/shell/testcases/nft-f/0030variable_reuse_0
new file mode 100755
index 00000000..8afc54aa
--- /dev/null
+++ b/tests/shell/testcases/nft-f/0030variable_reuse_0
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+set -e
+
+RULESET="define test = { 1.1.1.1 }
+
+table ip x {
+ set y {
+ type ipv4_addr
+ elements = { 2.2.2.2, \$test }
+ }
+
+ set z {
+ type ipv4_addr
+ elements = { 3.3.3.3, \$test }
+ }
+}"
+
+$NFT -f - <<< "$RULESET"