pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/regress/infra-unittests



Module Name:    pkgsrc
Committed By:   rillig
Date:           Sat Mar 21 06:53:18 UTC 2020

Modified Files:
        pkgsrc/regress/infra-unittests: subst.sh test.subr

Log Message:
regress/infra-unittests: fix assertion --file-is-lines

It had compared the actual output with itself, instead of comparing it to
the expected output.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 pkgsrc/regress/infra-unittests/subst.sh
cvs rdiff -u -r1.4 -r1.5 pkgsrc/regress/infra-unittests/test.subr

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/regress/infra-unittests/subst.sh
diff -u pkgsrc/regress/infra-unittests/subst.sh:1.6 pkgsrc/regress/infra-unittests/subst.sh:1.7
--- pkgsrc/regress/infra-unittests/subst.sh:1.6 Fri Mar 20 21:27:04 2020
+++ pkgsrc/regress/infra-unittests/subst.sh     Sat Mar 21 06:53:18 2020
@@ -499,11 +499,7 @@ EOF
        && exitcode=0 || exitcode=$?
 
        assert_that "stdout" --file-is-lines \
-               '=> Substituting "class" in *' \
-               'info: [subst.mk:class] Nothing changed in ./prepare-subst.mk.' \
-               'info: [subst.mk:class] Nothing changed in ./stderr.' \
-               'info: [subst.mk:class] Nothing changed in ./stdout.' \
-               'info: [subst.mk:class] Nothing changed in ./test.subr.main.mk.'
+               '=> Substituting "class" in [*]'
        assert_that "stderr" --file-is-empty
        assert_that "$exitcode" --equals "0"
 

Index: pkgsrc/regress/infra-unittests/test.subr
diff -u pkgsrc/regress/infra-unittests/test.subr:1.4 pkgsrc/regress/infra-unittests/test.subr:1.5
--- pkgsrc/regress/infra-unittests/test.subr:1.4        Fri Mar 20 21:27:04 2020
+++ pkgsrc/regress/infra-unittests/test.subr    Sat Mar 21 06:53:18 2020
@@ -1,5 +1,5 @@
 #! /bin/sh
-# $NetBSD: test.subr,v 1.4 2020/03/20 21:27:04 rillig Exp $
+# $NetBSD: test.subr,v 1.5 2020/03/21 06:53:18 rillig Exp $
 set -eu
 
 # This file defines utilities for testing Makefile fragments in a mocked
@@ -233,8 +233,8 @@ assert_that() {
 
        (--file-is-lines)
                _assert_that_tmp_actual="$tmpdir/$1"
-               _assert_that_tmp_expected="$tmpdir/$1"
-               _assert_that_filename="$1"; shift
+               _assert_that_tmp_expected="$tmpdir/expected"
+               _assert_that_filename="$1"; shift 2
 
                printf '%s\n' "$@" > "$_assert_that_tmp_expected"
                if diff -u "$_assert_that_tmp_expected" "$_assert_that_tmp_actual" > /dev/null; then



Home | Main Index | Thread Index | Old Index