diff options
author | Bruno Haible <bruno@clisp.org> | 2021-01-17 09:22:11 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2021-01-17 09:22:11 +0100 |
commit | 2473046c43577acf1ab8a9960a85a3273596659c (patch) | |
tree | 2c77961d27aab784cad87e28c1a9ac1e1403edd3 /tests/test-argp-version-etc-1.sh | |
parent | 2e9b9370bcc74dc88b35cb761ae15db72401add2 (diff) | |
download | gnulib-2473046c43577acf1ab8a9960a85a3273596659c.tar.gz |
argp tests: Avoid test failures on Alpine Linux.
* tests/test-argp-2.sh: Use the test framework (init.sh). Use the
'compare' function instead of 'diff -c'.
* tests/test-argp-version-etc-1.sh: Likewise.
Diffstat (limited to 'tests/test-argp-version-etc-1.sh')
-rwxr-xr-x | tests/test-argp-version-etc-1.sh | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/tests/test-argp-version-etc-1.sh b/tests/test-argp-version-etc-1.sh index 10b51d74c1..3ac42365aa 100755 --- a/tests/test-argp-version-etc-1.sh +++ b/tests/test-argp-version-etc-1.sh @@ -16,12 +16,14 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. -TMP=ave-expected.tmp +. "${srcdir=.}/init.sh"; path_prepend_ . + +ERR=0 + LC_ALL=C export LC_ALL -ERR=0 -cat > $TMP <<EOT +cat > expected <<EOT test-argp-version-etc (PROJECT) VERSION COPYRIGHT Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. @@ -31,13 +33,12 @@ There is NO WARRANTY, to the extent permitted by law. Written by Sergey Poznyakoff. EOT -${CHECKER} ./test-argp-version-etc${EXEEXT} --version | +${CHECKER} test-argp-version-etc${EXEEXT} --version | sed '1s/test-argp-version-etc (.*) .*/test-argp-version-etc (PROJECT) VERSION/ /^Packaged by/d 2,3 s/Copyright (C) [0-9]\{4,4\}/COPYRIGHT/' | - tr -d '\015' | - diff -c $TMP - || ERR=1 + tr -d '\015' > output -rm $TMP +compare expected output || ERR=1 -exit $ERR +Exit $ERR |