summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2014-02-04 08:27:22 +0000
committerPatrick McHardy <kaber@trash.net>2014-02-04 08:28:23 +0000
commit47e7132763633d88307ed5fadaf5f2b11d5490c6 (patch)
tree781ee5cfa3de2eb62c2108a60db9847f7b1eb78c /tests
parent61236968b7a1b4a4986f9a5c9a5e46d3eb70b799 (diff)
tests: add two tests for error reporting
Mixed syntactical and non-syntactical errors in individual commands and blocks. Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'tests')
-rw-r--r--tests/error.19
-rw-r--r--tests/error.218
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/error.1 b/tests/error.1
new file mode 100644
index 00000000..bc3bf16a
--- /dev/null
+++ b/tests/error.1
@@ -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
index 00000000..744a63d5
--- /dev/null
+++ b/tests/error.2
@@ -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
+ }
+}