summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorVarsha Rao <rvarsha016@gmail.com>2017-10-30 02:19:31 +0530
committerPablo Neira Ayuso <pablo@netfilter.org>2017-11-06 16:02:32 +0100
commit7462ef9269ebc98dcddd6a2c2f61dbd3457a777d (patch)
tree68b49cd0d78cb8a1d72df15e85a91434447e9440 /tests
parent0bb071529ca8501c0c8677968d2d7d100914ee95 (diff)
tests: shell: Add test case for map expression.
Add tests for different map expression. Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/shell/testcases/maps/different_map_types_110
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/shell/testcases/maps/different_map_types_1 b/tests/shell/testcases/maps/different_map_types_1
new file mode 100755
index 00000000..b0a09d02
--- /dev/null
+++ b/tests/shell/testcases/maps/different_map_types_1
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+# must fail: expr MAP { expr : type1, expr : type2, .. } expr
+
+set -e
+
+$NFT add table ip filter
+$NFT add chain ip filter output { type filter hook output priority 0 \; }
+$NFT add rule ip filter output meta mark set tcp dport map { 22 : 1, 23 : 192.168.0.1 }
+echo "E: Added two different types of expression to map"