summaryrefslogtreecommitdiffstats
path: root/iptables/tests/shell/testcases/ipt-restore/0011-noflush-empty-line_0
blob: bea1a690bb624d91250528b4efd0509e7ea308f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash -e

# make sure empty lines won't break --noflush

cat <<EOF | $XT_MULTI iptables-restore --noflush
# just a comment followed by innocent empty line

*filter
-A FORWARD -j ACCEPT
COMMIT
EOF

EXPECT='Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           '
diff -u <(echo "$EXPECT") <($XT_MULTI iptables -n -L FORWARD)