diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-10-28 23:08:53 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-10-28 23:08:53 +0200 |
commit | caddfc83399ab783f032dbe23f3b10a5bd85414f (patch) | |
tree | 91dc667eaafc3846f4c7089d7393f47821df641d /testsuite | |
parent | 8410ac1a073272affe8acdb0da67e5753ea051f8 (diff) | |
download | busybox-w32-caddfc83399ab783f032dbe23f3b10a5bd85414f.tar.gz busybox-w32-caddfc83399ab783f032dbe23f3b10a5bd85414f.tar.bz2 busybox-w32-caddfc83399ab783f032dbe23f3b10a5bd85414f.zip |
decompress_bunzip2: handle concatenated .bz2 files
function old new delta
unpack_bz2_stream 207 307 +100
start_bunzip 199 209 +10
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 110/0) Total: 110 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/bunzip2.tests | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/testsuite/bunzip2.tests b/testsuite/bunzip2.tests index 827aee867..fcfce1a31 100755 --- a/testsuite/bunzip2.tests +++ b/testsuite/bunzip2.tests | |||
@@ -463,6 +463,24 @@ $ECHO -ne "\x40\xa0\x00\x8b\x12\xe8\xfb\xb7\x27\xaa\xd3\x36\x0c\xfc\xe1\x40" | |||
463 | $ECHO -ne "\x01\xff\x8b\xb9\x22\x9c\x28\x48\x5f\xa5\xca\xf3\x80" | 463 | $ECHO -ne "\x01\xff\x8b\xb9\x22\x9c\x28\x48\x5f\xa5\xca\xf3\x80" |
464 | } | 464 | } |
465 | 465 | ||
466 | pbzip_4m_zeros() { | ||
467 | $ECHO -ne "\x42\x5a\x68\x31\x31\x41\x59\x26\x53\x59\x63\xe3\xec\xa2\x00\x06" | ||
468 | $ECHO -ne "\xe4\xc1\x00\xc0\x00\x02\x00\x00\x08\x20\x00\x30\xcc\x09\xaa\x69" | ||
469 | $ECHO -ne "\x94\xa1\x36\xa9\x28\x4f\x17\x72\x45\x38\x50\x90\x63\xe3\xec\xa2" | ||
470 | $ECHO -ne "\x42\x5a\x68\x31\x31\x41\x59\x26\x53\x59\x63\xe3\xec\xa2\x00\x06" | ||
471 | $ECHO -ne "\xe4\xc1\x00\xc0\x00\x02\x00\x00\x08\x20\x00\x30\xcc\x09\xaa\x69" | ||
472 | $ECHO -ne "\x94\xa1\x36\xa9\x28\x4f\x17\x72\x45\x38\x50\x90\x63\xe3\xec\xa2" | ||
473 | $ECHO -ne "\x42\x5a\x68\x31\x31\x41\x59\x26\x53\x59\x63\xe3\xec\xa2\x00\x06" | ||
474 | $ECHO -ne "\xe4\xc1\x00\xc0\x00\x02\x00\x00\x08\x20\x00\x30\xcc\x09\xaa\x69" | ||
475 | $ECHO -ne "\x94\xa1\x36\xa9\x28\x4f\x17\x72\x45\x38\x50\x90\x63\xe3\xec\xa2" | ||
476 | $ECHO -ne "\x42\x5a\x68\x31\x31\x41\x59\x26\x53\x59\x63\xe3\xec\xa2\x00\x06" | ||
477 | $ECHO -ne "\xe4\xc1\x00\xc0\x00\x02\x00\x00\x08\x20\x00\x30\xcc\x09\xaa\x69" | ||
478 | $ECHO -ne "\x94\xa1\x36\xa9\x28\x4f\x17\x72\x45\x38\x50\x90\x63\xe3\xec\xa2" | ||
479 | $ECHO -ne "\x42\x5a\x68\x31\x31\x41\x59\x26\x53\x59\xc9\xb5\x21\xef\x00\x04" | ||
480 | $ECHO -ne "\x8d\x40\x20\xc0\x00\x01\x00\x00\x08\x20\x00\x30\xcc\x05\x29\xa6" | ||
481 | $ECHO -ne "\x4a\x11\xb1\x4a\x11\xe2\xee\x48\xa7\x0a\x12\x19\x36\xa4\x3d\xe0" | ||
482 | } | ||
483 | |||
466 | prep() { | 484 | prep() { |
467 | rm -f t* | 485 | rm -f t* |
468 | hello_$ext >t1.$ext | 486 | hello_$ext >t1.$ext |
@@ -520,9 +538,18 @@ if test "${0##*/}" = "bunzip2.tests"; then | |||
520 | if test1_bz2 | ${bb}bunzip2 >/dev/null \ | 538 | if test1_bz2 | ${bb}bunzip2 >/dev/null \ |
521 | && test "`test1_bz2 | ${bb}bunzip2 | md5sum`" = "61bbeee4be9c6f110a71447f584fda7b -" | 539 | && test "`test1_bz2 | ${bb}bunzip2 | md5sum`" = "61bbeee4be9c6f110a71447f584fda7b -" |
522 | then | 540 | then |
523 | echo "PASS: $unpack: test bz2 file" | 541 | echo "PASS: $unpack: test_bz2 file" |
542 | else | ||
543 | echo "FAIL: $unpack: test_bz2 file" | ||
544 | FAILCOUNT=$((FAILCOUNT + 1)) | ||
545 | fi | ||
546 | |||
547 | if pbzip_4m_zeros | ${bb}bunzip2 >/dev/null \ | ||
548 | && test "`pbzip_4m_zeros | ${bb}bunzip2 | md5sum`" = "b5cfa9d6c8febd618f91ac2843d50a1c -" | ||
549 | then | ||
550 | echo "PASS: $unpack: pbzip_4m_zeros file" | ||
524 | else | 551 | else |
525 | echo "FAIL: $unpack: test bz2 file" | 552 | echo "FAIL: $unpack: pbzip_4m_zeros file" |
526 | FAILCOUNT=$((FAILCOUNT + 1)) | 553 | FAILCOUNT=$((FAILCOUNT + 1)) |
527 | fi | 554 | fi |
528 | fi | 555 | fi |