summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2020-04-26 12:46:33 +0000
committerrillig <rillig@pkgsrc.org>2020-04-26 12:46:33 +0000
commit193143cf8816140cc8709e0ab5eb9dfd9ddf2568 (patch)
tree5dbf0723caff19a9192db42a5ad29a5b17a78d2a /regress
parentdb21c2a1137ac21e9d4288598dd7fa4f50efd95e (diff)
downloadpkgsrc-193143cf8816140cc8709e0ab5eb9dfd9ddf2568.tar.gz
regress/infra-unittests: bring files into normal form
Diffstat (limited to 'regress')
-rw-r--r--regress/infra-unittests/extract.sh4
-rw-r--r--regress/infra-unittests/mocked-include.sh10
-rw-r--r--regress/infra-unittests/subst.sh2
-rw-r--r--regress/infra-unittests/test.subr7
-rw-r--r--regress/infra-unittests/tools-bison.sh7
5 files changed, 21 insertions, 9 deletions
diff --git a/regress/infra-unittests/extract.sh b/regress/infra-unittests/extract.sh
index ef6f2fde3d6..7369975fbf7 100644
--- a/regress/infra-unittests/extract.sh
+++ b/regress/infra-unittests/extract.sh
@@ -1,7 +1,9 @@
#! /bin/sh
+# $NetBSD: extract.sh,v 1.4 2020/04/26 12:46:33 rillig Exp $
#
-# Tests for mk/subst.mk.
+# Test cases for mk/extract/extract.
#
+
set -eu
. "./test.subr"
diff --git a/regress/infra-unittests/mocked-include.sh b/regress/infra-unittests/mocked-include.sh
index 1475deb6ef9..814e59e69ec 100644
--- a/regress/infra-unittests/mocked-include.sh
+++ b/regress/infra-unittests/mocked-include.sh
@@ -1,8 +1,12 @@
#! /bin/sh
-set -eu
+# $NetBSD: mocked-include.sh,v 1.4 2020/04/26 12:46:33 rillig Exp $
+#
+# Demonstrates how to mock a pkgsrc infrastructure file in a regression
+# test. This mocked file is created using create_pkgsrc_file and
+# overrides any file of the same name from the "real pkgsrc" directory.
+#
-# Ensures that files that are overridden in the "mocked pkgsrc" directory
-# are picked up before those from the "real pkgsrc" directory.
+set -eu
. "./test.subr"
diff --git a/regress/infra-unittests/subst.sh b/regress/infra-unittests/subst.sh
index f443f8c1a5e..3359b323df7 100644
--- a/regress/infra-unittests/subst.sh
+++ b/regress/infra-unittests/subst.sh
@@ -1,7 +1,9 @@
#! /bin/sh
+# $NetBSD: subst.sh,v 1.25 2020/04/26 12:46:33 rillig Exp $
#
# Tests for mk/subst.mk.
#
+
set -eu
. "./test.subr"
diff --git a/regress/infra-unittests/test.subr b/regress/infra-unittests/test.subr
index f2fa49a03ba..afad5b8a5cf 100644
--- a/regress/infra-unittests/test.subr
+++ b/regress/infra-unittests/test.subr
@@ -1,7 +1,6 @@
#! /bin/sh
-# $NetBSD: test.subr,v 1.9 2020/03/27 22:56:29 rillig Exp $
-set -eu
-
+# $NetBSD: test.subr,v 1.10 2020/04/26 12:46:33 rillig Exp $
+#
# This file defines utilities for testing Makefile fragments and shell
# programs from the pkgsrc infrastructure. While testing one part of the
# infrastructure, other parts can be mocked away.
@@ -114,6 +113,8 @@ set -eu
# directory after the test has run successfully.
#
+set -eu
+
: "${cleanup:=yes}"
: "${make:=bmake}"
: "${if_verbose=:}"
diff --git a/regress/infra-unittests/tools-bison.sh b/regress/infra-unittests/tools-bison.sh
index 8f492e16248..3292c007990 100644
--- a/regress/infra-unittests/tools-bison.sh
+++ b/regress/infra-unittests/tools-bison.sh
@@ -1,7 +1,10 @@
#! /bin/sh
-set -eu
-
+# $NetBSD: tools-bison.sh,v 1.4 2020/04/26 12:46:33 rillig Exp $
+#
# Tests for mk/tools/bison.mk
+#
+
+set -eu
. "./test.subr"