diff options
author | rillig <rillig@pkgsrc.org> | 2020-05-04 21:48:18 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2020-05-04 21:48:18 +0000 |
commit | 10662270495a14fa1e6b82722c63da30ce898b69 (patch) | |
tree | 90cb8008e2ce8860e78649b92ad2250b9965481d /regress | |
parent | 2a65548e361e75466a34b54e80f9b0509e39c676 (diff) | |
download | pkgsrc-10662270495a14fa1e6b82722c63da30ce898b69.tar.gz |
mk/check/check-portability: fix error message when no patches are found
Diffstat (limited to 'regress')
-rw-r--r-- | regress/infra-unittests/check-portability.sh | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/regress/infra-unittests/check-portability.sh b/regress/infra-unittests/check-portability.sh index 6435aeff8a1..c301a81ecf6 100644 --- a/regress/infra-unittests/check-portability.sh +++ b/regress/infra-unittests/check-portability.sh @@ -1,5 +1,5 @@ #! /bin/sh -# $NetBSD: check-portability.sh,v 1.1 2020/05/04 21:32:48 rillig Exp $ +# $NetBSD: check-portability.sh,v 1.2 2020/05/04 21:48:18 rillig Exp $ # # Test cases for mk/check/check-portability.*. # @@ -175,3 +175,21 @@ if test_case_begin 'special characters in filenames'; then test_case_end fi + + +if test_case_begin 'no patches'; then + + # Ensure that no error message is printed when there are no + # patch files. + + create_file_lines 'file' \ + '#! /bin/sh' \ + 'test a = b' + + check_portability_sh + + assert_that 'out' --file-is-empty + assert_that $exitcode --equals 0 + + test_case_end +fi |