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: add t...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a4e1ed8c4b82
branches:  trunk
changeset: 436542:a4e1ed8c4b82
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Tue Aug 04 21:35:01 2020 +0000

description:
regress/infra-unittests: add test for help, topic followed by comma

diffstat:

 regress/infra-unittests/help.sh |  23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diffs (35 lines):

diff -r fec5a99a8ed8 -r a4e1ed8c4b82 regress/infra-unittests/help.sh
--- a/regress/infra-unittests/help.sh   Tue Aug 04 19:09:10 2020 +0000
+++ b/regress/infra-unittests/help.sh   Tue Aug 04 21:35:01 2020 +0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# $NetBSD: help.sh,v 1.5 2020/05/16 20:22:41 rillig Exp $
+# $NetBSD: help.sh,v 1.6 2020/08/04 21:35:01 rillig Exp $
 #
 # Test cases for "bmake help", mainly implemented in mk/help/help.awk.
 #
@@ -142,3 +142,24 @@
 
        test_case_end
 fi
+
+
+if test_case_begin 'variable name followed by comma'; then
+
+       create_file 'fetch.mk' <<-EOF
+               #
+               # FETCH_USE_IPV4_ONLY, if defined, will ...
+               #       ...
+               #       ...
+       EOF
+
+       TOPIC='fetch_use_ipv4_only' awk -f "$pkgsrcdir/mk/help/help.awk" \
+               'fetch.mk' >'out'
+
+       assert_that 'out' --file-is-lines \
+               'No help found for fetch_use_ipv4_only, but it appears in:' \
+               '' \
+               'fetch.mk'
+
+       test_case_end
+fi



Home | Main Index | Thread Index | Old Index