pfctl test: Add a test for macro names with a space in it

This commit is contained in:
Kristof Provost 2018-10-28 05:50:04 +00:00
parent d3f6532494
commit c964e17bfe
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=339838
2 changed files with 30 additions and 1 deletions

View File

@ -1,6 +1,7 @@
# $FreeBSD$
ATF_TESTS_SH= pfctl_test
ATF_TESTS_SH= pfctl_test \
macro
SUBDIR+= files

28
sbin/pfctl/tests/macro.sh Executable file
View File

@ -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"
}