diff options
Diffstat (limited to 'regress/show-all/spec')
-rw-r--r-- | regress/show-all/spec | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/regress/show-all/spec b/regress/show-all/spec deleted file mode 100644 index b2a6b793667..00000000000 --- a/regress/show-all/spec +++ /dev/null @@ -1,90 +0,0 @@ -# $NetBSD: spec,v 1.5 2020/07/01 07:39:52 rillig Exp $ - -tmpdir=${TMPDIR:-/tmp}/pkgsrc-show-all -rm -rf "$tmpdir" -mkdir -p "$tmpdir" - -require_file() { - if diff -u "$3" "$1" > /dev/null; then - : - else - regress_fail "Expected files to be equal." - diff -u "$3" "$1" || true - fi -} - - -do_test() { - $TEST_MAKE show-all-regress > "$tmpdir/show-all-regress.out" - $TEST_MAKE show-all-shellvar > "$tmpdir/show-all-shellvar.out" -} - -check_result() { - exit_status 0 - - cat <<'EOF' > "$tmpdir/expected" -regress: - pkg REGRESS_ENV.undefined # undefined - pkg REGRESS_ENV.empty= # empty - pkg REGRESS_ENV.space= # empty - pkg REGRESS_ENV.value= \ - *=all \ - VAR1=value1 \ - VAR2=`command \ - backticks` \ - execution \ - via \ - # end of REGRESS_ENV.value (sorted) - pkg REGRESS_ARGS.undefined # undefined - pkg REGRESS_ARGS.empty= # empty - pkg REGRESS_ARGS.space= # empty - pkg REGRESS_ARGS.value= \ - VAR1=value1 \ - VAR2=`command \ - execution \ - via \ - backticks` \ - *=all \ - # end of REGRESS_ARGS.value - pkg REGRESS.undefined # undefined - pkg REGRESS.empty= # empty - pkg REGRESS.space= # ends with space - pkg REGRESS.value= All * kinds of `strange' \escape $$characters - pkg *= show-all-regress - pkg **= asterisk - -EOF - - # The "*" variable is built-in into bmake and expands to the current - # make target, which in this case is "show-all-regress". - - # The "**" variable ensures that show-all doesn't accidentally expand - # filenames. - - # It's a bit strange that bmake doesn't handle the backticks command - # as a single word. Luckily, this is a rare case. - # - # On the other hand, if it did, bmake would also have to handle - # variable expansion and all the other syntactic difficulties from - # parsing shell commands, and that would be just too much. - - require_file "$tmpdir/show-all-regress.out" --equals "$tmpdir/expected" - - - # Up to 2020-03-20, the output of the ENV and ARGS variables differed - # a lot from the PLAIN variable. - # - cat <<'EOF' > "$tmpdir/expected" -shellvar: - pkg SHELLVAR_PLAIN= "$$var $${var} $$other $$$$" - pkg SHELLVAR_ENV= \ - "$$var $${var} $$other $$$$" \ - # end of SHELLVAR_ENV (sorted) - pkg SHELLVAR_ARGS= \ - "$$var $${var} $$other $$$$" \ - # end of SHELLVAR_ARGS - -EOF - - require_file "$tmpdir/show-all-shellvar.out" --equals "$tmpdir/expected" -} |