summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/sets/0010comments_0
diff options
context:
space:
mode:
Diffstat (limited to 'tests/shell/testcases/sets/0010comments_0')
-rwxr-xr-xtests/shell/testcases/sets/0010comments_011
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/shell/testcases/sets/0010comments_0 b/tests/shell/testcases/sets/0010comments_0
new file mode 100755
index 0000000..4467a3b
--- /dev/null
+++ b/tests/shell/testcases/sets/0010comments_0
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+# Test that comments are added to set elements in standard sets.
+
+$NFT add table inet t
+$NFT add set inet t s {type ipv6_addr \; }
+$NFT add element inet t s { ::1 comment "test" }
+if ! $NFT list ruleset | grep test >/dev/null ; then
+ echo "E: missing comment in set element" >&2
+ exit 1
+fi