From 418b05fcd64815e6928cb9751285fa2d29a34361 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 7 Nov 2015 10:31:21 +0100 Subject: Adding upstream version 1.13~rc2. Signed-off-by: Daniel Baumann --- testsuite/check.sh | 4 ++-- testsuite/unzcrash.cc | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'testsuite') diff --git a/testsuite/check.sh b/testsuite/check.sh index 69291e2..a82d0de 100755 --- a/testsuite/check.sh +++ b/testsuite/check.sh @@ -1,6 +1,6 @@ #! /bin/sh # check script for Lzip - Data compressor based on the LZMA algorithm -# Copyright (C) 2008, 2009, 2010, 2011 Antonio Diaz Diaz. +# Copyright (C) 2008, 2009, 2010, 2011, 2012 Antonio Diaz Diaz. # # This script is free software: you have unlimited permission # to copy, distribute and modify it. @@ -82,7 +82,7 @@ for i in s4Ki 0 1 2 3 4 5 6 7 8 9 ; do printf . done -"${LZIP}" -$i < in > anyothername || fail=1 +"${LZIP}" < in > anyothername || fail=1 "${LZIP}" -d anyothername || fail=1 cmp in anyothername.out || fail=1 printf . diff --git a/testsuite/unzcrash.cc b/testsuite/unzcrash.cc index b80580f..65d160d 100644 --- a/testsuite/unzcrash.cc +++ b/testsuite/unzcrash.cc @@ -106,7 +106,8 @@ void show_error( const char * const msg, const int errcode = 0, } -void internal_error( const char * const msg ) +void internal_error( const char * const msg ) throw() __attribute__ ((noreturn)); +void internal_error( const char * const msg ) throw() { if( verbosity >= 0 ) std::fprintf( stderr, "%s: internal error: %s.\n", program_name, msg ); @@ -340,7 +341,9 @@ int main( const int argc, const char * const argv[] ) if( !f ) { show_error( "Can't open pipe", errno ); return 1; } std::fwrite( buffer, 1, size, f ); - pclose( f ); + if( pclose( f ) == 0 && verbosity >= 0 ) + std::fprintf( stderr, "0x%02X (0x%02X+0x%02X) passed the test\n", + buffer[i], byte, j + 1 ); } } buffer[i] = byte; -- cgit v1.2.3