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: Sun May 3 08:42:22 UTC 2020
Modified Files:
pkgsrc/regress/infra-unittests: help.sh
Log Message:
regress/infra-unittests: demonstrate wrong help topics without keywords
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/regress/infra-unittests/help.sh
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/help.sh
diff -u pkgsrc/regress/infra-unittests/help.sh:1.1 pkgsrc/regress/infra-unittests/help.sh:1.2
--- pkgsrc/regress/infra-unittests/help.sh:1.1 Mon Mar 30 06:40:53 2020
+++ pkgsrc/regress/infra-unittests/help.sh Sun May 3 08:42:22 2020
@@ -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 @@ if test_case_begin "short help topic"; t
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