new file mode 100755
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+set -e
+
+tmpdir=$(mktemp -d)
+if [ ! -d $tmpdir ] ; then
+ echo "Failed to create tmp directory" >&2
+ exit 0
+fi
+
+# cleanup if aborted
+trap "rm -rf $tmpdir" EXIT
+
+cat > $tmpdir/top.nft << EOF
+include "$tmpdir/a.nft"
+include "$tmpdir/b.nft"
+
+EOF
+
+cat > $tmpdir/a.nft << EOF
+define AAA = "testa"
+EOF
+
+cat > $tmpdir/b.nft << EOF
+define AAA = "testb"
+EOF
+
+$NFT -f $tmpdir/top.nft
+
+if [ $? -ne 0 ] ; then
+ echo "E: unable to load good ruleset" >&2
+ exit 1
+fi
\ No newline at end of file
new file mode 100755
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+set -e
+
+tmpdir=$(mktemp -d)
+if [ ! -d $tmpdir ] ; then
+ echo "Failed to create tmp directory" >&2
+ exit 0
+fi
+
+# cleanup if aborted
+trap "rm -rf $tmpdir" EXIT
+
+cat > $tmpdir/top.nft << EOF
+define TOP = "top"
+include "$tmpdir/a.nft"
+EOF
+
+cat > $tmpdir/a.nft << EOF
+define AAA = "testa"
+include "$tmpdir/sub/*.nft"
+EOF
+
+mkdir $tmpdir/sub &> /dev/null
+
+cat > $tmpdir/sub/b.nft << EOF
+define FOO = { \$TOP, abc }
+EOF
+
+cat > $tmpdir/sub/c.nft << EOF
+define BAR = { \$AAA, cdef }
+EOF
+
+$NFT -f $tmpdir/top.nft
+
+if [ $? -ne 0 ] ; then
+ echo "E: unable to load good ruleset" >&2
+ exit 1
+fi
\ No newline at end of file
new file mode 100755
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+set -e
+
+tmpdir=$(mktemp -d)
+if [ ! -d $tmpdir ] ; then
+ echo "Failed to create tmp directory" >&2
+ exit 0
+fi
+
+# cleanup if aborted
+trap "rm -rf $tmpdir" EXIT
+
+cat > $tmpdir/top.nft << EOF
+define TOP = "top"
+include "$tmpdir/a.nft"
+define CCC = \$BBB
+global undefine BBB
+EOF
+
+cat > $tmpdir/a.nft << EOF
+define AAA = "testa"
+include "$tmpdir/sub/b.nft"
+EOF
+
+mkdir $tmpdir/sub &> /dev/null
+
+cat > $tmpdir/sub/b.nft << EOF
+global define BBB = "global"
+global redefine BBB = "global2"
+EOF
+
+$NFT -f $tmpdir/top.nft
+
+if [ $? -ne 0 ] ; then
+ echo "E: unable to load good ruleset" >&2
+ exit 1
+fi
new file mode 100755
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+set -e
+
+tmpdir=$(mktemp -d)
+if [ ! -d $tmpdir ] ; then
+ echo "Failed to create tmp directory" >&2
+ exit 0
+fi
+
+# cleanup if aborted
+trap "rm -rf $tmpdir" EXIT
+
+cat > $tmpdir/top.nft << EOF
+define TOP = "top"
+global define FAIL = \$TOP
+EOF
+
+$NFT -f $tmpdir/top.nft 2> /dev/null
+echo "E: local variable in global define"