summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/listing/0001ruleset_0
blob: 1a3a73b198c81c41b6f1ec971cfd0e115c4ee357 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

# list ruleset shows a table

EXPECTED="table ip test {
}"

set -e

$NFT add table test
GET="$($NFT list ruleset)"

if [ "$EXPECTED" != "$GET" ] ; then
	DIFF="$(which diff)"
	[ -x $DIFF ] && $DIFF -u <(echo "$EXPECTED") <(echo "$GET")
	exit 1
fi