Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/regress/infra-unittests regress/infra-unittests: demon...
details: https://anonhg.NetBSD.org/pkgsrc/rev/e234402812a7
branches: trunk
changeset: 430670:e234402812a7
user: rillig <rillig%pkgsrc.org@localhost>
date: Sun May 03 08:42:22 2020 +0000
description:
regress/infra-unittests: demonstrate wrong help topics without keywords
diffstat:
regress/infra-unittests/help.sh | 30 +++++++++++++++++++++++++++++-
1 files changed, 29 insertions(+), 1 deletions(-)
diffs (42 lines):
diff -r 1330a49e685d -r e234402812a7 regress/infra-unittests/help.sh
--- a/regress/infra-unittests/help.sh Sun May 03 08:27:10 2020 +0000
+++ b/regress/infra-unittests/help.sh Sun May 03 08:42:22 2020 +0000
@@ -1,5 +1,5 @@
#! /bin/sh
-# $NetBSD: help.sh,v 1.1 2020/03/30 06:40:53 rillig Exp $
+# $NetBSD: help.sh,v 1.2 2020/05/03 08:42:22 rillig Exp $
#
# Test cases for "bmake help", mainly implemented in mk/help/help.awk.
#
@@ -92,3 +92,31 @@
test_case_end
fi
+
+
+if test_case_begin "comments without keywords"; then
+
+ # In the top-level Makefile, the SUBDIR section contains a few
+ # comment lines, which are implementation comments and do not
+ # contain keywords. These should not appear in the help.
+
+ create_file_lines "Makefile" \
+ 'SUBDIR+= subdir1' \
+ '# Comment1' \
+ '# Comment2' \
+ '# Comment3' \
+ 'SUBDIR+= subdir2'
+
+ TOPIC=':all' awk -f "$pkgsrcdir/mk/help/help.awk" \
+ 'Makefile' >"out"
+
+ # FIXME: should be empty
+ assert_that 'out' --file-is-lines \
+ '===> Makefile (keywords:):' \
+ '# Comment1' \
+ '# Comment2' \
+ '# Comment3' \
+ 'SUBDIR+= subdir2'
+
+ test_case_end
+fi
Home |
Main Index |
Thread Index |
Old Index