Date: Sun, 28 Oct 2018 05:50:04 +0000 (UTC) From: Kristof Provost <kp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r339838 - head/sbin/pfctl/tests Message-ID: <201810280550.w9S5o4MU016579@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kp Date: Sun Oct 28 05:50:04 2018 New Revision: 339838 URL: https://svnweb.freebsd.org/changeset/base/339838 Log: pfctl test: Add a test for macro names with a space in it Added: head/sbin/pfctl/tests/macro.sh (contents, props changed) Modified: head/sbin/pfctl/tests/Makefile Modified: head/sbin/pfctl/tests/Makefile ============================================================================== --- head/sbin/pfctl/tests/Makefile Sun Oct 28 05:41:13 2018 (r339837) +++ head/sbin/pfctl/tests/Makefile Sun Oct 28 05:50:04 2018 (r339838) @@ -1,6 +1,7 @@ # $FreeBSD$ -ATF_TESTS_SH= pfctl_test +ATF_TESTS_SH= pfctl_test \ + macro SUBDIR+= files Added: head/sbin/pfctl/tests/macro.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/pfctl/tests/macro.sh Sun Oct 28 05:50:04 2018 (r339838) @@ -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" +}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810280550.w9S5o4MU016579>