xref: /freebsd/sbin/pfctl/tests/macro.sh (revision 939aacb600776ec11a524c81be85a39527d2d7c8)
1c964e17bSKristof Provost
2c964e17bSKristof Provostatf_test_case "space" cleanup
3c964e17bSKristof Provostspace_head()
4c964e17bSKristof Provost{
5c964e17bSKristof Provost	atf_set descr "Test macros with spaces"
6*939aacb6SKristof Provost	atf_set require.kmods "pf"
7c964e17bSKristof Provost}
8c964e17bSKristof Provost
9c964e17bSKristof Provostspace_body()
10c964e17bSKristof Provost{
11c964e17bSKristof Provost	echo \"this is\" = \"a variable\" > pf.conf
12c964e17bSKristof Provost	cat pf.conf
13c964e17bSKristof Provost	atf_check -o ignore -e ignore -s exit:1 pfctl -nvf pf.conf
14c964e17bSKristof Provost
15c964e17bSKristof Provost	echo this = \"a variable\" > pf.conf
16c964e17bSKristof Provost	cat pf.conf
17c964e17bSKristof Provost	atf_check -o ignore -s exit:0 pfctl -nvf pf.conf
18c964e17bSKristof Provost}
19c964e17bSKristof Provost
20c964e17bSKristof Provostspace_cleanup()
21c964e17bSKristof Provost{
22c964e17bSKristof Provost	rm -f pf.conf
23c964e17bSKristof Provost}
24c964e17bSKristof Provost
25c964e17bSKristof Provostatf_init_test_cases()
26c964e17bSKristof Provost{
27c964e17bSKristof Provost	atf_add_test_case "space"
28c964e17bSKristof Provost}
29