svn commit: r339838 - head/sbin/pfctl/tests

Kristof Provost kp at FreeBSD.org
Sun Oct 28 05:50:05 UTC 2018


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


More information about the svn-src-head mailing list