Add a test to cover typeof with concatenations. Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> --- tests/shell/testcases/sets/0045typeof_sets_0 | 14 ++++++++++++++ tests/shell/testcases/sets/dumps/0045typeof_sets_0.nft | 7 +++++++ 2 files changed, 21 insertions(+) create mode 100755 tests/shell/testcases/sets/0045typeof_sets_0 create mode 100644 tests/shell/testcases/sets/dumps/0045typeof_sets_0.nft diff --git a/tests/shell/testcases/sets/0045typeof_sets_0 b/tests/shell/testcases/sets/0045typeof_sets_0 new file mode 100755 index 000000000000..3cf8d0b0c22d --- /dev/null +++ b/tests/shell/testcases/sets/0045typeof_sets_0 @@ -0,0 +1,14 @@ +#!/bin/bash + +EXPECTED="table ip foo { + set whitelist { + typeof ip saddr . ip daddr . meta mark + elements = { 192.168.10.35 . 192.168.10.11 . 0x00000010, + 192.168.10.101 . 192.168.10.12 . 0x00000020, + } + } +} +" + +set -e +$NFT -f - <<< $EXPECTED diff --git a/tests/shell/testcases/sets/dumps/0045typeof_sets_0.nft b/tests/shell/testcases/sets/dumps/0045typeof_sets_0.nft new file mode 100644 index 000000000000..68c900a72ac6 --- /dev/null +++ b/tests/shell/testcases/sets/dumps/0045typeof_sets_0.nft @@ -0,0 +1,7 @@ +table ip foo { + set whitelist { + typeof ip saddr . ip daddr . meta mark + elements = { 192.168.10.35 . 192.168.10.11 . 0x00000010, + 192.168.10.101 . 192.168.10.12 . 0x00000020 } + } +} -- 2.11.0