summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2020-05-03 09:51:07 +0000
committerrillig <rillig@pkgsrc.org>2020-05-03 09:51:07 +0000
commitad526e87eb33848edaec3d8ff251879c1251c7bd (patch)
treebd6e3bef1a56900a033e7435c3330f5a1db9edbd /regress
parentaac21bb29b3fbfb5d4623d2a746de4b70b99215d (diff)
downloadpkgsrc-ad526e87eb33848edaec3d8ff251879c1251c7bd.tar.gz
mk/help: do not treat continuation lines as textual comments
Diffstat (limited to 'regress')
-rw-r--r--regress/infra-unittests/help.sh29
1 files changed, 28 insertions, 1 deletions
diff --git a/regress/infra-unittests/help.sh b/regress/infra-unittests/help.sh
index 1fd21a867ac..4c0028722e4 100644
--- a/regress/infra-unittests/help.sh
+++ b/regress/infra-unittests/help.sh
@@ -1,5 +1,5 @@
#! /bin/sh
-# $NetBSD: help.sh,v 1.3 2020/05/03 08:49:16 rillig Exp $
+# $NetBSD: help.sh,v 1.4 2020/05/03 09:51:07 rillig Exp $
#
# Test cases for "bmake help", mainly implemented in mk/help/help.awk.
#
@@ -115,3 +115,30 @@ if test_case_begin "comments without keywords"; then
test_case_end
fi
+
+
+if test_case_begin "commented variables with continuation lines"; then
+
+ # When a variable assignment is commented out, it can still
+ # contain continuation lines. These are not ordinary comments
+ # and therefore do not count to the minimum number of comment
+ # lines.
+ #
+ # Found in mk/defaults/mk.conf.
+
+ create_file_lines "mk.conf" \
+ '# Australia.' \
+ '#' \
+ '#MASTER_SITE_OPENOFFICE= ... \' \
+ '# ... \' \
+ '# ...' \
+ '#'
+
+ TOPIC=':all' awk -f "$pkgsrcdir/mk/help/help.awk" \
+ 'mk.conf' >"out"
+
+ assert_that 'out' --file-is-lines \
+ 'No help found for :all.'
+
+ test_case_end
+fi