Sun Feb 9 22:28:58 2020 UTC ()
regress/path: demonstrate wrong handling of PATH directories with spaces

See PR pkg/53959.


(rillig)
diff -r0 -r1.1 pkgsrc/regress/path/spec

File Added: pkgsrc/regress/path/spec
#! /bin/sh
# $NetBSD: spec,v 1.1 2020/02/09 22:28:58 rillig Exp $
#
# Ensures that the PATH variable can contain spaces, and that commands in
# such directories can be found and executed.
#
# For its own directories (PREFIX, WRKDIR), pkgsrc does not support paths
# with spaces, though.

do_test() {
	env \
		PATH="/Path with spaces:$PATH:/Path with spaces" \
		PKGNAME="package-1.0" \
		$TEST_MAKE \
			-f "../../mk/bsd.pkg.mk" \
			show-var VARNAME=PATH > "$TEST_OUTFILE"
}

check_result() {
	exit_status 0

	# FIXME: the spaces must be preserved.
	output_require ":/Path:with:spaces:"
	# FIXME: the spaces must be preserved.
	output_require "/Path:with:spaces$"
}