add tests for whitespace surrounding properties
authorjasper <jasper@openbsd.org>
Mon, 26 Oct 2015 18:09:32 +0000 (18:09 +0000)
committerjasper <jasper@openbsd.org>
Mon, 26 Oct 2015 18:09:32 +0000 (18:09 +0000)
regress/usr.bin/pkg-config/Makefile
regress/usr.bin/pkg-config/pcdir/whitespace-prop-1.pc [new file with mode: 0644]
regress/usr.bin/pkg-config/pcdir/whitespace-prop-2.pc [new file with mode: 0644]
regress/usr.bin/pkg-config/pcdir/whitespace-prop-3.pc [new file with mode: 0644]

index 5eef857..26a725a 100644 (file)
@@ -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 (file)
index 0000000..628f0ac
--- /dev/null
@@ -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 (file)
index 0000000..9baddc6
--- /dev/null
@@ -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 (file)
index 0000000..6687d49
--- /dev/null
@@ -0,0 +1,3 @@
+Name: Whitespace test
+Description: pkg-config(1) regress file
+Version:       0.0.0