diff options
Diffstat (limited to 'tests/shell/testcases/sets/typeof_sets_0')
-rwxr-xr-x | tests/shell/testcases/sets/typeof_sets_0 | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/shell/testcases/sets/typeof_sets_0 b/tests/shell/testcases/sets/typeof_sets_0 new file mode 100755 index 00000000..2a8b21c7 --- /dev/null +++ b/tests/shell/testcases/sets/typeof_sets_0 @@ -0,0 +1,29 @@ +#!/bin/bash + +# support for strings/typeof in named sets. +# s1 and s2 are identical, they just use different +# ways for declaration. + +EXPECTED="table inet t { + set s1 { + typeof osf name + elements = { \"Linux\" } + } + + set s2 { + typeof vlan id + elements = { 2, 3, 103 } + } + + chain c1 { + osf name @s1 accept + } + + chain c2 { + ether type vlan vlan id @s2 accept + } +}" + +set -e +$NFT -f - <<< $EXPECTED + |