summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/nft-f/0001define_slash_0
blob: 4ce7089c6c2af2c2707885dc07e64332c010e816 (plain)
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
#!/bin/bash

# tests for commit 85d6803 (parser_bison: initializer_expr must use rhs_expr)

MKTEMP=$(which mktemp)
if [ -x $MKTEMP ] ; then
	tmpfile=$(${MKTEMP})
else
	tmpfile=$(/tmp/${RANDOM})
fi

if [ ! -w $tmpfile ] ; then
	echo "Failed to create tmp file" >&2
	exit 0
fi

trap "rm -rf $tmpfile" EXIT # cleanup if aborted

echo "
define net = 1.1.1.1/24
" > $tmpfile

set -e

$NFT -f $tmpfile