From: Fabian Keil Date: Sun, 24 Jan 2021 14:12:23 +0000 (+0100) Subject: runtests.pl: properly print the test if it contains binary zeros X-Git-Tag: curl-7_82_0~254 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=43eef423d6a6d43da27d5e96d08515e95df9d4c7;p=thirdparty%2Fcurl.git runtests.pl: properly print the test if it contains binary zeros --- diff --git a/tests/runtests.pl b/tests/runtests.pl index 7ac22035b0..066a91bf5c 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -3763,7 +3763,9 @@ sub singletest { # save the new version open(D, ">$otest"); - print D @entiretest; + foreach my $bytes (@entiretest) { + print D pack('a*', $bytes) or die "Failed to print '$bytes': $!"; + } close(D); # in case the process changed the file, reload it