]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: add two tests for error reporting
authorPatrick McHardy <kaber@trash.net>
Tue, 4 Feb 2014 08:27:22 +0000 (08:27 +0000)
committerPatrick McHardy <kaber@trash.net>
Tue, 4 Feb 2014 08:28:23 +0000 (08:28 +0000)
Mixed syntactical and non-syntactical errors in individual commands and
blocks.

Signed-off-by: Patrick McHardy <kaber@trash.net>
tests/error.1 [new file with mode: 0644]
tests/error.2 [new file with mode: 0644]

diff --git a/tests/error.1 b/tests/error.1
new file mode 100644 (file)
index 0000000..bc3bf16
--- /dev/null
@@ -0,0 +1,9 @@
+#! nft -f
+
+# mixed syntactical and non-syntactical errors
+filter {
+filter input
+filter input tcp
+filter input tcp dport
+filter input tcp dport tcp
+filter input tcp dport tcp dport
diff --git a/tests/error.2 b/tests/error.2
new file mode 100644 (file)
index 0000000..744a63d
--- /dev/null
@@ -0,0 +1,18 @@
+#! nft -f
+
+# mixed syntactical and non-syntactical errors in blocks
+table filter {
+       # missing identifier
+       chain
+
+       # missing chain block
+       chain output
+
+       chain output {
+               tcp
+               tcp dport
+               tcp dport tcp
+               tcp dport tcp dport
+               tcp dport ssh
+       }
+}