diff options
author | rillig <rillig@pkgsrc.org> | 2019-07-17 18:34:16 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2019-07-17 18:34:16 +0000 |
commit | 0e3f9425ee0801661f9b1b9f0e2ea10174d0d1d0 (patch) | |
tree | f61769a5677dd9492212134eb142eb0c5eba9840 /regress/print-plist-python | |
parent | 9d058516a0c2a3bc9047c243b81aaad6166d12fa (diff) | |
download | pkgsrc-0e3f9425ee0801661f9b1b9f0e2ea10174d0d1d0.tar.gz |
lang/python: fix PYVERSSUFFIX escaping for print-PLIST
Before, the filename "3270" was wrongly replaced with "${PYVERSSUFFIX}"
since the version number "3.7", when interpreted as a regular expression,
matched that filename.
Diffstat (limited to 'regress/print-plist-python')
-rw-r--r-- | regress/print-plist-python/DESCR | 3 | ||||
-rw-r--r-- | regress/print-plist-python/Makefile | 32 | ||||
-rw-r--r-- | regress/print-plist-python/PLIST | 3 | ||||
-rw-r--r-- | regress/print-plist-python/spec | 12 |
4 files changed, 50 insertions, 0 deletions
diff --git a/regress/print-plist-python/DESCR b/regress/print-plist-python/DESCR new file mode 100644 index 00000000000..2a4e5549dbc --- /dev/null +++ b/regress/print-plist-python/DESCR @@ -0,0 +1,3 @@ +This test verifies that the dots that may appear as "3.7" in PYVERSSUFFIX +are properly escaped when that variable is treated as a regular +expression in PLIST_AWK. diff --git a/regress/print-plist-python/Makefile b/regress/print-plist-python/Makefile new file mode 100644 index 00000000000..9a62dd831a9 --- /dev/null +++ b/regress/print-plist-python/Makefile @@ -0,0 +1,32 @@ +# $NetBSD: Makefile,v 1.1 2019/07/17 18:34:16 rillig Exp $ + +DISTNAME= print-plist-python-0.0 +CATEGORIES= regress +MASTER_SITES= # none +DISTFILES= # none + +MAINTAINER= pkgsrc-users@NetBSD.org +COMMENT= Test escaping in PRINT_PLIST_AWK +LICENSE= 2-clause-bsd + +NO_CHECKSUM= yes +NO_CONFIGURE= yes +WRKSRC= ${WRKDIR} +AUTO_MKDIRS= yes + +# When interpreted as a regular expression, the version number "3.7" +# matches the filename "share/emul3270". Therefore only that version works. +PYTHON_VERSIONS_ACCEPTABLE= 37 + +pre-build: + ${TOUCH} ${WRKDIR}/setup.py + +post-build: + ${ECHO} "content" >${WRKDIR}/file + +post-install: + ${INSTALL_DATA} ${WRKSRC}/file ${DESTDIR}${PREFIX}/share/emul3270 + ${INSTALL_DATA} ${WRKSRC}/file ${DESTDIR}${PREFIX}/share/file-${PYVERSSUFFIX}.txt + +.include "../../lang/python/egg.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/regress/print-plist-python/PLIST b/regress/print-plist-python/PLIST new file mode 100644 index 00000000000..37b326faff0 --- /dev/null +++ b/regress/print-plist-python/PLIST @@ -0,0 +1,3 @@ +@comment $NetBSD: PLIST,v 1.1 2019/07/17 18:34:16 rillig Exp $ +share/emul3270 +share/file-${PYVERSSUFFIX}.txt diff --git a/regress/print-plist-python/spec b/regress/print-plist-python/spec new file mode 100644 index 00000000000..1cc6ce3724f --- /dev/null +++ b/regress/print-plist-python/spec @@ -0,0 +1,12 @@ +# $NetBSD: spec,v 1.1 2019/07/17 18:34:16 rillig Exp $ + +MAKEARGS_TEST="-s install print-PLIST" + +MAKEARGS_CLEAN="deinstall clean" + +check_result() +{ + exit_status 0 + output_require "^share/emul3270$" + output_require "^share/file-\\\${PYVERSSUFFIX}\\.txt$" +} |