1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
#!/bin/sh -x
TEST="that empty includes that create noops get parsed correctly"
testdir=`dirname $0`
. $testdir/testlib
cat > $work/rules <<EOF
input eth0 {
proto tcp dport ssh accept;
include $work/empty ;
};
EOF
if test $? -ne 0 ; then no_result ; fi
cat > $work/empty <<EOF
EOF
if test $? -ne 0 ; then no_result ; fi
$here/convert < $work/rules > $work/out
if test $? -ne 0 ; then fail ; fi
cat > $work/good <<EOF
( siblist
( input eth0
)
child
( siblist
( siblist
( proto tcp
)
child
( siblist
( dport ssh
)
child
( accept
)
)
)
)
)
EOF
compare $work/good $work/out
# got this far?
pass
|