Extend and slightly rework tests/shell to cover this case too.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
$1->init = $4;
$$ = $1;
}
+ | map_block comment_spec stmt_separator
+ {
+ $1->comment = $2;
+ $$ = $1;
+ }
| map_block set_mechanism stmt_separator
;
#!/bin/bash
+set -e
+
# Test that comments are added to sets
$NFT add table t
$NFT add set t s {type ipv4_addr \; flags interval \; comment "test" \;}
-if ! $NFT list ruleset | grep test >/dev/null ; then
- echo "E: missing comment in set" >&2
- exit 1
-fi
-
+$NFT add map t m {type ipv4_addr : ipv4_addr \; flags interval \; comment \"another test\" \;}
flags interval
comment "test"
}
+
+ map m {
+ type ipv4_addr : ipv4_addr
+ flags interval
+ comment "another test"
+ }
}