From owner-svn-src-all@freebsd.org Sun Oct 28 05:50:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A01FB10E83DF; Sun, 28 Oct 2018 05:50:05 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FF6771045; Sun, 28 Oct 2018 05:50:05 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 280DE1B3C4; Sun, 28 Oct 2018 05:50:05 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9S5o4bU016580; Sun, 28 Oct 2018 05:50:04 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9S5o4MU016579; Sun, 28 Oct 2018 05:50:04 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201810280550.w9S5o4MU016579@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sun, 28 Oct 2018 05:50:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r339838 - head/sbin/pfctl/tests X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/sbin/pfctl/tests X-SVN-Commit-Revision: 339838 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2018 05:50:05 -0000 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" +}