summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/listing/0013objects_0
diff options
context:
space:
mode:
Diffstat (limited to 'tests/shell/testcases/listing/0013objects_0')
-rwxr-xr-xtests/shell/testcases/listing/0013objects_033
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/shell/testcases/listing/0013objects_0 b/tests/shell/testcases/listing/0013objects_0
new file mode 100755
index 00000000..c5e0e323
--- /dev/null
+++ b/tests/shell/testcases/listing/0013objects_0
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+# list table with all objects and chains
+
+EXPECTED="table ip test {
+ quota https-quota {
+ 25 mbytes
+ }
+
+ ct helper cthelp {
+ type \"sip\" protocol tcp
+ l3proto ip
+ }
+
+ chain input {
+ }
+}"
+
+set -e
+
+$NFT add table test
+$NFT add chain test input
+$NFT add quota test https-quota 25 mbytes
+$NFT add ct helper test cthelp { type \"sip\" protocol tcp \; }
+$NFT add table test-ip
+
+GET="$($NFT list table test)"
+if [ "$EXPECTED" != "$GET" ] ; then
+ DIFF="$(which diff)"
+ [ -x $DIFF ] && $DIFF -u <(echo "$EXPECTED") <(echo "$GET")
+ exit 1
+fi
+