From 319b9844340cba6c65ac8c0bb116d33e1644e751 Mon Sep 17 00:00:00 2001 From: Michael Debertol Date: Tue, 3 Aug 2021 23:42:40 +0200 Subject: [PATCH] gnu-test: base32/64: modify test expectation for invalid inputs When decoding an invalid base32/64 string, gnu writes everything it was able to decode until it hit the decode error, while we don't write anything if the input is invalid. --- util/build-gnu.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/util/build-gnu.sh b/util/build-gnu.sh index 798a33456..1ce0133f8 100644 --- a/util/build-gnu.sh +++ b/util/build-gnu.sh @@ -1,6 +1,6 @@ #!/bin/bash -# spell-checker:ignore (paths) abmon deref discrim eacces getlimits getopt ginstall gnulib inacc infloop inotify reflink ; (misc) INT_OFLOW OFLOW ; (vars/env) BUILDDIR SRCDIR +# spell-checker:ignore (paths) abmon deref discrim eacces getlimits getopt ginstall gnulib inacc infloop inotify reflink ; (misc) INT_OFLOW OFLOW baddecode ; (vars/env) BUILDDIR SRCDIR set -e if test ! -d ../gnu; then @@ -119,3 +119,7 @@ sed -i -e "s|rm: cannot remove 'a/1'|rm: cannot remove 'a'|g" tests/rm/rm2.sh sed -i -e "s|removed directory 'a/'|removed directory 'a'|g" tests/rm/v-slash.sh test -f "${BUILDDIR}/getlimits" || cp src/getlimits "${BUILDDIR}" + +# When decoding an invalid base32/64 string, gnu writes everything it was able to decode until +# it hit the decode error, while we don't write anything if the input is invalid. +sed -i "s/\(baddecode.*OUT=>\"\).*\"/\1\"/g" tests/misc/base64.pl \ No newline at end of file