From 1c256a7b6c871412dfb3cf1f78d44539a89448aa Mon Sep 17 00:00:00 2001 From: jasper Date: Mon, 26 Oct 2015 18:09:32 +0000 Subject: [PATCH] add tests for whitespace surrounding properties --- regress/usr.bin/pkg-config/Makefile | 16 +++++++++++++++- .../pkg-config/pcdir/whitespace-prop-1.pc | 4 ++++ .../pkg-config/pcdir/whitespace-prop-2.pc | 7 +++++++ .../pkg-config/pcdir/whitespace-prop-3.pc | 3 +++ 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 regress/usr.bin/pkg-config/pcdir/whitespace-prop-1.pc create mode 100644 regress/usr.bin/pkg-config/pcdir/whitespace-prop-2.pc create mode 100644 regress/usr.bin/pkg-config/pcdir/whitespace-prop-3.pc diff --git a/regress/usr.bin/pkg-config/Makefile b/regress/usr.bin/pkg-config/Makefile index 5eef8570176..26a725a9a7d 100644 --- a/regress/usr.bin/pkg-config/Makefile +++ b/regress/usr.bin/pkg-config/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.52 2015/10/11 11:47:21 jasper Exp $ +# $OpenBSD: Makefile,v 1.53 2015/10/26 18:09:32 jasper Exp $ REGRESS_TARGETS=cmp-vers1-1 \ cmp-vers1-2 \ @@ -63,6 +63,8 @@ REGRESS_TARGETS=cmp-vers1-1 \ whitespace-libs \ whitespace-linebreak \ whitespace-name \ + whitespace-property-1 \ + whitespace-property-2 \ quoting \ broken-require-1 \ broken-require-2 \ @@ -469,6 +471,18 @@ whitespace-name: @if ${VPCONFIG} "whitespace > 0.2.0"; then false; fi @diff -u ${WANT} ${GOT} +whitespace-property-1: + # Test lack of whitespace after property name + @echo "-I/usr/local/include" > ${WANT} + @${VPCONFIG} --cflags whitespace-prop-1 + @diff -u ${WANT} ${GOT} + +whitespace-property-2: + # Test whitespace after property name + @echo "0.0.0" > ${WANT} + @${VPCONFIG} --modversion whitespace-prop-3 + @diff -u ${WANT} ${GOT} + quoting: # Test for stripping out quotes from variables @echo "-I/usr/X11R6/include/freetype2" > ${WANT} diff --git a/regress/usr.bin/pkg-config/pcdir/whitespace-prop-1.pc b/regress/usr.bin/pkg-config/pcdir/whitespace-prop-1.pc new file mode 100644 index 00000000000..628f0ac48b3 --- /dev/null +++ b/regress/usr.bin/pkg-config/pcdir/whitespace-prop-1.pc @@ -0,0 +1,4 @@ +Name: Whitespace test +Description: pkg-config(1) regress file +Version: 0.0.0 +Requires:whitespace-prop-2 diff --git a/regress/usr.bin/pkg-config/pcdir/whitespace-prop-2.pc b/regress/usr.bin/pkg-config/pcdir/whitespace-prop-2.pc new file mode 100644 index 00000000000..9baddc69577 --- /dev/null +++ b/regress/usr.bin/pkg-config/pcdir/whitespace-prop-2.pc @@ -0,0 +1,7 @@ +prefix=/usr/local +includedir=${prefix}/include + +Name: Whitespace test +Description: pkg-config(1) regress file +Version: 0.0.0 +Cflags: -I${includedir} diff --git a/regress/usr.bin/pkg-config/pcdir/whitespace-prop-3.pc b/regress/usr.bin/pkg-config/pcdir/whitespace-prop-3.pc new file mode 100644 index 00000000000..6687d49b1ed --- /dev/null +++ b/regress/usr.bin/pkg-config/pcdir/whitespace-prop-3.pc @@ -0,0 +1,3 @@ +Name: Whitespace test +Description: pkg-config(1) regress file +Version: 0.0.0 -- 2.20.1