diff options
author | Kristof Provost <kp@FreeBSD.org> | 2018-10-28 05:50:04 +0000 |
---|---|---|
committer | Kristof Provost <kp@FreeBSD.org> | 2018-10-28 05:50:04 +0000 |
commit | c964e17bfee2a8a83048a66c85154828de225f96 (patch) | |
tree | 7e501c1827834412e29882550bb4160a1bc303f0 /sbin/pfctl | |
parent | d3f65324948aeef11ed5fbe193e33e1e6898d206 (diff) | |
download | src-test-c964e17bfee2a8a83048a66c85154828de225f96.tar.gz src-test-c964e17bfee2a8a83048a66c85154828de225f96.zip |
pfctl test: Add a test for macro names with a space in it
Notes
Notes:
svn path=/head/; revision=339838
Diffstat (limited to 'sbin/pfctl')
-rw-r--r-- | sbin/pfctl/tests/Makefile | 3 | ||||
-rwxr-xr-x | sbin/pfctl/tests/macro.sh | 28 |
2 files changed, 30 insertions, 1 deletions
diff --git a/sbin/pfctl/tests/Makefile b/sbin/pfctl/tests/Makefile index 675acac1d0f4a..b4aa2de120b36 100644 --- a/sbin/pfctl/tests/Makefile +++ b/sbin/pfctl/tests/Makefile @@ -1,6 +1,7 @@ # $FreeBSD$ -ATF_TESTS_SH= pfctl_test +ATF_TESTS_SH= pfctl_test \ + macro SUBDIR+= files diff --git a/sbin/pfctl/tests/macro.sh b/sbin/pfctl/tests/macro.sh new file mode 100755 index 0000000000000..194e101d2f841 --- /dev/null +++ b/sbin/pfctl/tests/macro.sh @@ -0,0 +1,28 @@ +# $FreeBSD$ + +atf_test_case "space" cleanup +space_head() +{ + atf_set descr "Test macros with spaces" +} + +space_body() +{ + echo \"this is\" = \"a variable\" > pf.conf + cat pf.conf + atf_check -o ignore -e ignore -s exit:1 pfctl -nvf pf.conf + + echo this = \"a variable\" > pf.conf + cat pf.conf + atf_check -o ignore -s exit:0 pfctl -nvf pf.conf +} + +space_cleanup() +{ + rm -f pf.conf +} + +atf_init_test_cases() +{ + atf_add_test_case "space" +} |