summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/nft-f/0013defines_1
diff options
context:
space:
mode:
Diffstat (limited to 'tests/shell/testcases/nft-f/0013defines_1')
-rwxr-xr-xtests/shell/testcases/nft-f/0013defines_118
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/shell/testcases/nft-f/0013defines_1 b/tests/shell/testcases/nft-f/0013defines_1
new file mode 100755
index 0000000..b633088
--- /dev/null
+++ b/tests/shell/testcases/nft-f/0013defines_1
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+# Tests use of variable before definition.
+
+set -e
+
+RULESET="
+define var2 = \$var1
+define var1 = lo
+
+table ip t {
+ chain c {
+ iif \$var2
+ }
+}"
+
+$NFT -f - <<< "$RULESET" && exit 1
+exit 0