libbz2 Validation
Port build from safelibs/port-libbz2 at commit 17ac371291fe (release build-17ac371291fe)
Tests
libbz2 C API round trip Original / libbz2 / c-api-buffer-roundtrip Passed
bzip2 command round trip Original / libbz2 / cli-compress-decompress Passed
bzip2 corrupted stream rejection Original / libbz2 / corrupted-stream-rejection Passed
Debian sample fixture parity Original / libbz2 / debian-sample-parity Passed
bzip2 stream concatenation Original / libbz2 / stream-concatenation Passed
bunzip2 alias decompress Original / libbz2 / usage-bunzip2-alias Passed
bunzip2 -c reads stdin and writes to stdout Original / libbz2 / usage-bunzip2-c-stdin-roundtrip Passed
Pipes a freshly compressed stream into bunzip2 -c on stdin and verifies stdout reproduces the original bytes exactly.
bunzip2 stdin pipe decompresses to exact bytes Original / libbz2 / usage-bunzip2-explicit-suffix-decompress Passed
Compresses a payload with bzip2 to stdout and verifies bunzip2 reading from stdin restores the original bytes exactly.
bunzip2 force overwrite existing output Original / libbz2 / usage-bunzip2-force-overwrite Passed
Pre-populates the decompressed output path with stale bytes and verifies bunzip2 -f replaces it with the recovered payload while keeping the compressed input via -k.
bunzip2 expands concatenated multi-stream input Original / libbz2 / usage-bunzip2-multistream-concatenation Passed
Concatenates three independently compressed bzip2 streams and verifies bunzip2 reassembles the exact joined payload via stdin.
bunzip2 --keep long flag preserves the .bz2 input after decompression Original / libbz2 / usage-bunzip2-r10-long-keep-flag Passed
Decompresses a .bz2 file with bunzip2 --keep and verifies both the original archive and the decompressed output exist with matching content.
bunzip2 stdin output Original / libbz2 / usage-bunzip2-stdin-output Passed
bunzip2 stdout roundtrip Original / libbz2 / usage-bunzip2-stdout-roundtrip Passed
Decompresses a bzip2 stream to stdout with bunzip2 -c and verifies the restored plaintext payload.
bunzip2 stdout sample1 Original / libbz2 / usage-bunzip2-stdout-sample1 Passed
Decompresses the bundled sample1 fixture to stdout with bunzip2 and verifies byte-for-byte parity with the reference file.
bunzip2 test alias Original / libbz2 / usage-bunzip2-test-alias Passed
bzcat reads compressed data Original / libbz2 / usage-bzcat-alias Passed
bzcat concatenated streams Original / libbz2 / usage-bzcat-concatenated-streams Passed
bzcat /dev/stdin redirected from .bz2 Original / libbz2 / usage-bzcat-dev-stdin-redirect Passed
Feeds a bzip2-compressed file into bzcat by passing /dev/stdin as an explicit argument while redirecting fd 0 from the .bz2 file, and verifies the output matches the original bytes.
bzcat preserves embedded null bytes Original / libbz2 / usage-bzcat-null-bytes-preserved Passed
Compresses a binary payload that contains embedded NUL (0x00) bytes interleaved with ASCII text and verifies bzcat decompression reproduces the bytes exactly, with NULs intact and at the original offsets.
bzcat preserves the exact source line count Original / libbz2 / usage-bzcat-preserves-exact-line-count Passed
Builds a source file with a known number of newline-terminated lines, compresses it with bzip2, and verifies bzcat decompression yields exactly the same line count plus the same final-newline status as the source - guarding against off-by-one or trailing-newline drift in the decompression path.
bzcat sample2 lines Original / libbz2 / usage-bzcat-sample2-lines Passed
Streams the bundled sample2 fixture through bzcat and verifies the decompressed text is nonempty.
bzcat sample three compare Original / libbz2 / usage-bzcat-sample3-compare Passed
bzcat handles file paths containing spaces Original / libbz2 / usage-bzcat-spaces-in-path Passed
Compresses a file located at a path containing space characters in both directory and filename components and verifies bzcat decompresses it correctly when the quoted path is passed as a positional argument.
bzcat stdin input Original / libbz2 / usage-bzcat-stdin-input Passed
Pipes a bzip2 stream into bzcat from stdin and verifies the decompressed payload appears on stdout.
bzcat concatenates three file arguments Original / libbz2 / usage-bzcat-three-files-args Passed
Passes three independently compressed files as positional arguments to bzcat and verifies all three payloads appear in order.
bzcat two files Original / libbz2 / usage-bzcat-two-files Passed
Concatenates two compressed files with bzcat and verifies both decompressed payloads appear in the output.
bzcmp different files Original / libbz2 / usage-bzcmp-different-exit Passed
Compares two different compressed files with bzcmp and verifies the command reports a textual difference.
bzcmp identical archives Original / libbz2 / usage-bzcmp-identical Passed
bzcmp ignore initial bytes Original / libbz2 / usage-bzcmp-ignore-initial-bytes Passed
Builds two compressed payloads that differ only in their first two decompressed bytes and verifies bzcmp --ignore-initial=2 reports them as equal while the unskipped compare exits non-zero.
bzcmp -l lists every differing byte Original / libbz2 / usage-bzcmp-l-listing Passed
Compresses two same-length payloads with several known differing byte positions and verifies bzcmp -l prints one line per differing byte at the expected 1-indexed offsets, with the differing byte values rendered in octal.
bzcmp -s suppresses output and reports via exit code Original / libbz2 / usage-bzcmp-silent-flag Passed
Runs bzcmp -s on identical and differing compressed inputs and verifies stdout/stderr stay empty while the exit code carries the result.
bzcmp -i skips a leading byte run Original / libbz2 / usage-bzcmp-skip-prefix-bytes Passed
Builds a payload whose compressed copy differs from the same payload prepended with a fixed prefix, and verifies bzcmp -i N on the matching prefix length reports the streams as equal.
bzcmp pinpoints differing byte across compressed pair Original / libbz2 / usage-bzcmp-trailing-byte-difference Passed
Builds two .bz2 inputs whose decompressed payloads differ by one byte and verifies bzcmp reports a non-zero exit with the differing offset.
bzdiff -q reports differing files briefly Original / libbz2 / usage-bzdiff-brief-q-flag Passed
Runs bzdiff -q (brief mode) on identical and differing compressed inputs and verifies the report mentions the differing files without emitting full diff hunks.
bzdiff different files Original / libbz2 / usage-bzdiff-different-exit Passed
Diffs two different compressed files with bzdiff and verifies the command reports a textual difference.
bzdiff reports zero diff across all bzip2 levels Original / libbz2 / usage-bzdiff-identical-different-levels Passed
Compresses identical content at every bzip2 level from -1 through -9, then runs bzdiff between the level-1 archive and each other level, verifying every comparison reports no payload difference.
bzdiff compares matching streams Original / libbz2 / usage-bzdiff-identical Passed
bzdiff treats different-level encodings as identical Original / libbz2 / usage-bzdiff-levels-same-content Passed
Compresses identical content at -1 and -9 and verifies bzdiff reports no payload differences across the two encodings.
bzdiff one-arg compares file.bz2 against on-disk file Original / libbz2 / usage-bzdiff-one-arg-vs-disk Passed
Exercises bzdiff's documented single-argument mode where bzdiff file.bz2 decompresses file.bz2 and diffs it against the sibling uncompressed file on disk, covering both the matching and modified-on-disk cases.
bzdiff changed-line output Original / libbz2 / usage-bzdiff-space-filenames Passed
bzdiff diffs two plain (non-bzip2) regular files via diff fallback Original / libbz2 / usage-bzdiff-two-non-bzip2-regular-files Passed
Invokes bzdiff with two regular text files (no .bz2 extension or magic) and verifies bzdiff still reports the textual difference - bzdiff falls back to diff when its arguments are not bzip2 streams. Confirms the "<" and ">" diff markers, and that two identical plain files report no difference.
bzgrep POSIX BRE bracket class Original / libbz2 / usage-bzgrep-bre-bracket-class Passed
Searches a compressed file with a default POSIX BRE pattern using a bracket class and verifies only matching lines are emitted.
bzgrep -c reports per-file match counts Original / libbz2 / usage-bzgrep-c-counts-per-file Passed
Searches three compressed files with bzgrep -c and verifies the emitted output is a "filename:count" line per input, with the per-file counts matching the constructed match distribution (3, 0, 5).
bzgrep count lines Original / libbz2 / usage-bzgrep-count-lines Passed
bzgrep -c counts matches across multiple compressed files Original / libbz2 / usage-bzgrep-count-matches-multiple Passed
Searches two compressed inputs with bzgrep -c and verifies the per-file match counts are emitted accurately.
bzgrep count matches Original / libbz2 / usage-bzgrep-count Passed
bzgrep -E alternation matches either pattern Original / libbz2 / usage-bzgrep-e-multiple-patterns Passed
Uses bzgrep -E with a regex alternation over a compressed file and verifies lines matching either pattern are emitted in original order regardless of alternation argument order.
bzgrep extended regexp alternation Original / libbz2 / usage-bzgrep-extended-regexp Passed
Searches a compressed text stream with bzgrep -E and verifies both alternation branches produce matching lines.
bzgrep spaced filename search Original / libbz2 / usage-bzgrep-filename-space Passed
bzgrep -L lists files without a match Original / libbz2 / usage-bzgrep-files-without-match Passed
Searches several .bz2 inputs with bzgrep -L and verifies only the file lacking the pattern is printed, while files containing the pattern are omitted.
bzgrep fixed string Original / libbz2 / usage-bzgrep-fixed-string Passed
Searches compressed text with bzgrep fixed-string mode and verifies the matching line is returned.
bzgrep -h suppresses the per-line filename prefix across multiple inputs Original / libbz2 / usage-bzgrep-h-suppress-filename-prefix Passed
Searches two compressed files at once with bzgrep -h and verifies that, unlike the default multi-file mode, no "filename:" prefix is attached to each match line. The raw matched lines must appear exactly as in the source.
bzgrep ignore case search Original / libbz2 / usage-bzgrep-ignore-case Passed
bzgrep invert match Original / libbz2 / usage-bzgrep-invert-match Passed
Uses bzgrep -v on a compressed text stream and verifies non-matching lines appear while the excluded line is omitted.
bzgrep line number output Original / libbz2 / usage-bzgrep-line-number Passed
bzgrep list matching file Original / libbz2 / usage-bzgrep-list-matching-file Passed
Searches compressed text with bzgrep -l and verifies the matching compressed filename is emitted.
bzgrep -m 2 caps match count at two Original / libbz2 / usage-bzgrep-max-count-limits-matches Passed
Searches a compressed file containing five matching lines with bzgrep -m 2 and verifies only the first two matches are emitted.
bzgrep prefixes matches with filename across multiple compressed inputs Original / libbz2 / usage-bzgrep-multiple-files-prefix Passed
Searches three compressed files at once with bzgrep and verifies each emitted match is prefixed with the originating filename, and that a non-matching file is silently skipped.
bzgrep -l accepts --null and lists matching filenames Original / libbz2 / usage-bzgrep-null-terminated-filenames Passed
Runs bzgrep -l --null over two compressed files where only one matches and verifies the wrapper accepts the --null flag, lists exactly the matching filename, and skips the non-matching file. (Ubuntu's bzgrep prints filenames itself in -l mode, so the NUL request from --null is absorbed by the wrapper rather than reaching grep.)
bzgrep only matching Original / libbz2 / usage-bzgrep-only-matching Passed
bzgrep -E enables extended regex alternation Original / libbz2 / usage-bzgrep-r11-extended-regex-flag Passed
Compresses a payload with three distinct lines and verifies bzgrep -E '(apple|cherry)' selects exactly the two lines matching either alternative while skipping the unrelated line, exercising the extended-regex alternation operator that BRE would treat as literal characters.
bzgrep -l prints filenames of matching archives only Original / libbz2 / usage-bzgrep-r11-files-with-matches-flag Passed
Builds two .bz2 archives where only one contains the search pattern and verifies bzgrep -l prints just the matching archive's filename, omits the non-matching archive, and writes no per-line content to stdout (bzgrep returns nonzero when at least one input has no matches, so the exit status is captured rather than checked by set -e).
bzgrep -x matches whole lines only, not partial occurrences Original / libbz2 / usage-bzgrep-r11-line-match Passed
Compresses a payload containing the literal "exact" on a line by itself and the substring "exactly" on another line, then verifies bzgrep -x 'exact' returns only the standalone-line match and excludes the partial-line occurrence.
bzgrep -w matches whole words and rejects substrings Original / libbz2 / usage-bzgrep-r11-word-match Passed
Compresses a payload containing the substrings "cat" and "category" and verifies bzgrep -w 'cat' prints only the line where "cat" appears as a whole word, with the word-boundary substring match excluded from the output.
bzgrep searches compressed data Original / libbz2 / usage-bzgrep-search Passed
bzgrep -w matches whole words and rejects substrings Original / libbz2 / usage-bzgrep-w-whole-word-only Passed
Searches a compressed file containing both "cat" as a standalone word and "cat" inside larger words (catalog, scatter, concatenate) using bzgrep -w, and verifies only the whole-word lines are emitted while substring lines are excluded.
bzgrep word regexp Original / libbz2 / usage-bzgrep-word-regexp Passed
bzcat numbered pipe Original / libbz2 / usage-bzip2-batch11-bzcat-numbered-pipe Passed
bzgrep after context Original / libbz2 / usage-bzip2-batch11-bzgrep-after-context Passed
bzgrep before context Original / libbz2 / usage-bzip2-batch11-bzgrep-before-context Passed
bzgrep fixed brackets Original / libbz2 / usage-bzip2-batch11-bzgrep-fixed-brackets Passed
bzgrep no filename Original / libbz2 / usage-bzip2-batch11-bzgrep-no-filename Passed
bzgrep nonmatching file Original / libbz2 / usage-bzip2-batch11-bzgrep-nonmatching-file Passed
Searches compressed files with bzgrep -L and verifies the nonmatching compressed filename is emitted.
bzgrep quiet match Original / libbz2 / usage-bzip2-batch11-bzgrep-quiet-match Passed
bzmore pager cat Original / libbz2 / usage-bzip2-batch11-bzmore-pager-cat Passed
Reads a compressed file through bzmore with cat as the pager and verifies the decompressed text.
bzip2 compress c flag Original / libbz2 / usage-bzip2-batch11-compress-c-flag Passed
bzip2 decompress c flag Original / libbz2 / usage-bzip2-batch11-decompress-c-flag Passed
bzcat on a non-bzip2 file exits nonzero Original / libbz2 / usage-bzip2-batch12-bzcat-mixed-with-uncompressed-fails Passed
Runs bzcat against a plain text file that is not bzip2 compressed and verifies it exits with a non-zero status.
bzdiff between two compressed copies of the same content yields no differences Original / libbz2 / usage-bzip2-batch12-bzdiff-three-way-equal Passed
Compresses identical content into two separate .bz2 files (different filenames) and verifies bzdiff exits zero with no output (no differences).
bzgrep -F treats pattern as fixed string with regex metacharacters Original / libbz2 / usage-bzip2-batch12-bzgrep-fixed-string-matches-only Passed
Compresses a file containing both a literal "a.b" and a string matching the regex a.b (ax3b), then verifies bzgrep -F "a.b" matches only the literal line.
bzip2 roundtrip preserves all 256 byte values Original / libbz2 / usage-bzip2-batch12-decompress-binary-256-bytes Passed
Compresses a 256-byte payload containing all byte values 0x00..0xff with bzip2 and verifies decompression returns the exact same bytes.
bzip2 -d on empty stdin exits nonzero Original / libbz2 / usage-bzip2-batch12-decompress-empty-stdin-rejects Passed
Pipes zero bytes (empty file) into "bzip2 -d" and verifies bzip2 reports a non-zero exit code (a 0-byte stream is not a valid bzip2 archive).
bzip2 -d concatenated three streams produces concatenated payload Original / libbz2 / usage-bzip2-batch12-decompress-multistream-three-streams Passed
Compresses three different payloads, concatenates the three .bz2 streams into a single file, and verifies bzip2 -d returns the concatenated original payloads.
bzip2 -dc concatenates multiple bz2 files in argument order Original / libbz2 / usage-bzip2-batch12-multi-file-stdout-concat Passed
Compresses three text files separately, then runs bzip2 -dc with all three as arguments and verifies the concatenated output equals the original three files concatenated.
bzip2recover on a multi-block archive yields rec*.bz2 files Original / libbz2 / usage-bzip2-batch12-recover-yields-block-files Passed
Compresses 1MB of pseudo-random data with -9 (multiple blocks), runs bzip2recover, and verifies at least one rec*.bz2 piece file is produced and each is itself a valid bz2 stream.
bzip2 -c reads stdin and writes compressed stream to stdout via temp files Original / libbz2 / usage-bzip2-batch12-stdin-c-flag-stdout-pipeline Passed
Pipes input into bzip2 -c using temp files (no shell pipe to avoid SIGPIPE), then decompresses with bunzip2 -c and verifies the roundtripped bytes match.
bzip2 -t rejects an archive with a flipped data byte Original / libbz2 / usage-bzip2-batch12-test-corrupt-byte-flips-fail Passed
Compresses a payload, flips a single byte deep inside the archive, and verifies bzip2 -t exits nonzero (reports corruption).
bzip2 best compression file Original / libbz2 / usage-bzip2-best-compress-file Passed
Compresses a file at the highest bzip2 block setting and verifies decompression restores the original payload.
bzip2 best compress roundtrip Original / libbz2 / usage-bzip2-best-compress-roundtrip Passed
Compresses a file with bzip2 -9, decompresses it again, and verifies the restored plaintext payload.
bzip2 best stdout stream Original / libbz2 / usage-bzip2-best-stdout Passed
bzip2 block size six roundtrip Original / libbz2 / usage-bzip2-block-six-roundtrip Passed
Compresses a multi-line payload with bzip2 -6, decompresses it through bzip2 -dc, and verifies byte-for-byte equality with the source.
bzip2 compress file Original / libbz2 / usage-bzip2-compress-file Passed
bzip2 concatenated streams Original / libbz2 / usage-bzip2-concatenated-streams Passed
bzip2 round-trips a file with long runs of consecutive NUL bytes Original / libbz2 / usage-bzip2-consecutive-nul-bytes-roundtrip Passed
Builds a payload dominated by long runs of consecutive NUL (0x00) bytes interleaved with short ASCII markers, compresses with bzip2, decompresses it back, and verifies every NUL is preserved at the same offset and count.
bzip2 rejects corrupt stream Original / libbz2 / usage-bzip2-corrupt-rejection Passed
bzip2 custom suffix round trip Original / libbz2 / usage-bzip2-custom-suffix-roundtrip Passed
bzip2 -d strips the .bz suffix Original / libbz2 / usage-bzip2-decompress-bz-suffix Passed
Verifies that bzip2 -d recognises the legacy .bz extension and decompresses payload.bz to a suffix-less payload file with the original bytes.
bzip2 decompress keep input Original / libbz2 / usage-bzip2-decompress-keep-input Passed
bunzip2 -k preserves archive Original / libbz2 / usage-bzip2-decompress-keep-leaves-archive Passed
Runs bunzip2 -k on a .bz2 file and verifies both the original archive and the newly written decompressed file are present and that the decoded content matches the pre-compression bytes.
bzip2 --decompress is the long-form alias for -d Original / libbz2 / usage-bzip2-decompress-long-flag Passed
Round-trips a payload by compressing with bzip2 -c and then decompressing with bzip2 --decompress -c, confirming the long --decompress flag behaves identically to the short -d alias on both file-arg and stdin variants.
bzip2 -d missing file fails Original / libbz2 / usage-bzip2-decompress-missing-file-exit Passed
Asks bzip2 -d to decompress a path that does not exist and confirms it exits non-zero with an error written to stderr.
bzip2 quiet decompress stdin Original / libbz2 / usage-bzip2-decompress-quiet-stdin Passed
Decompresses a bzip2 stream from stdin with bzip2 -dcq and verifies the restored payload is written to stdout.
bzip2 decompress replaces compressed file Original / libbz2 / usage-bzip2-decompress-replace-input Passed
Compresses a file with bzip2, decompresses it with bzip2 -d, and verifies the .bz2 file is removed and the plaintext restored.
bunzip2 strips suffix Original / libbz2 / usage-bzip2-decompress-suffix Passed
bzip2 round-trips arbitrary binary with embedded newlines Original / libbz2 / usage-bzip2-embedded-newlines-binary-roundtrip Passed
Builds a payload mixing newline bytes, NUL bytes, and the full 0..255 byte range, round-trips it through bzip2/bunzip2, and verifies sha256 matches.
bzip2 empty file roundtrip Original / libbz2 / usage-bzip2-empty-file-roundtrip Passed
Compresses and decompresses an empty file with bzip2 and verifies that the restored output remains empty.
bzip2 empty file round trip Original / libbz2 / usage-bzip2-empty-file Passed
bzip2 empty stdout stream Original / libbz2 / usage-bzip2-empty-stdout Passed
Compresses and decompresses an empty file through stdout and verifies the reconstructed output is still empty.
bzip2 explicit /dev/stdin path Original / libbz2 / usage-bzip2-explicit-dev-stdin Passed
Decompresses a bzip2 stream by passing /dev/stdin as the explicit input path and verifies the recovered plaintext matches the original.
bzip2 -2 -5 -8 set the block-size header byte Original / libbz2 / usage-bzip2-explicit-levels-block-byte Passed
Compresses the same payload at three explicit non-extreme levels and verifies the fourth header byte encodes the requested level.
bzip2 fast compression file Original / libbz2 / usage-bzip2-fast-compress-file Passed
Compresses a file at the fastest bzip2 block setting and verifies decompression restores the original payload.
bzip2 fast compress roundtrip Original / libbz2 / usage-bzip2-fast-compress-roundtrip Passed
Compresses a file with bzip2 -1, decompresses it again, and verifies the restored plaintext payload.
bzip2 fast stdout stream Original / libbz2 / usage-bzip2-fast-stdout Passed
bzip2 -1 and -9 produce distinct compressed sizes Original / libbz2 / usage-bzip2-fast-vs-best-size-differs Passed
Compresses a highly compressible payload at -1 and -9 and verifies the two outputs differ in size while round-tripping to identical bytes.
bzip2 force decompress over existing file Original / libbz2 / usage-bzip2-force-decompress-suffix Passed
Uses bzip2 -df to overwrite a pre-existing file when decompressing a .bz2 archive and verifies the restored content.
bzip2 force overwrite Original / libbz2 / usage-bzip2-force-overwrite Passed
bzip2 --help advertises core options Original / libbz2 / usage-bzip2-help-output Passed
Runs bzip2 --help and verifies the help banner mentions the version, the -d/-z compression toggles, and the block-size flag, then runs bzip2 -h and confirms the same banner is produced.
bzip2 -1 strictly larger than -9 on repeating text Original / libbz2 / usage-bzip2-highly-compressible-size-strictly-decreasing Passed
Compresses a deeply repetitive text payload at -1 and -9 and verifies the -9 output is strictly smaller than -1, with both rounds-tripping to identical original bytes via libbz2.
bzip2 -1 and -9 produce near-equal sizes on random data Original / libbz2 / usage-bzip2-incompressible-random-levels Passed
Compresses an incompressible random binary payload at -1 and -9 and verifies both streams round-trip and end up within a small relative size of each other (incompressible input cannot be meaningfully shrunk by any block size).
bzip2 keep input on compress Original / libbz2 / usage-bzip2-keep-input-compress Passed
bzip2 keep multi-file compress Original / libbz2 / usage-bzip2-keep-multi-file-compress Passed
Compresses two files with bzip2 -k and verifies the originals and compressed outputs both remain present.
bzip2 -k preserves original bytes alongside .bz2 Original / libbz2 / usage-bzip2-keep-preserves-original-bytes Passed
Compresses a file with bzip2 -k and verifies the original is preserved byte-for-byte while a non-empty valid .bz2 is produced.
bzip2 large block Original / libbz2 / usage-bzip2-large-block Passed
bzip2 -2 roundtrip integrity Original / libbz2 / usage-bzip2-level-2-roundtrip-integrity Passed
Compresses a 200KB structured payload at block level 2 and verifies bzip2 -t accepts it and bunzip2 -c reproduces the bytes exactly.
bzip2 -7 roundtrip integrity Original / libbz2 / usage-bzip2-level-7-roundtrip-integrity Passed
Compresses a deterministic payload at block level 7 and verifies bzip2 -t accepts the file and the round-tripped bytes match the original.
bzip2 levels 1 and 9 round-trip identically Original / libbz2 / usage-bzip2-level-size-monotonic Passed
Compresses the same payload at -1 and -9 and verifies both decompress to identical bytes via libbz2.
bzip2 -1 and -9 round-trip a 1MB pseudo-random file Original / libbz2 / usage-bzip2-levels-1-and-9-roundtrip-1mb Passed
Generates a deterministic 1MB pseudo-random payload, compresses it with bzip2 -1 and bzip2 -9 separately, decompresses both, and verifies the SHA-256 of each restored byte stream matches the original.
bzip2 license flag Original / libbz2 / usage-bzip2-license-flag Passed
bzip2 emits BZh magic header Original / libbz2 / usage-bzip2-magic-bytes-header Passed
Compresses a payload and verifies the produced .bz2 stream begins with the bzip2 BZh magic bytes.
bzip2 medium block stdout Original / libbz2 / usage-bzip2-medium-stdout Passed
bzip2 multi-file compress Original / libbz2 / usage-bzip2-multi-file-compress Passed
bzip2 multi-file decompress Original / libbz2 / usage-bzip2-multi-file-decompress Passed
bzip2 -t accepts mixed-level archives Original / libbz2 / usage-bzip2-multi-file-mixed-levels-test Passed
Compresses three distinct payloads at block levels 1, 5, and 9 and verifies a single bzip2 -t invocation accepts all three resulting archives.
bzip2 -q suppresses unrecognised-suffix warnings Original / libbz2 / usage-bzip2-q-suppresses-suffix-warning Passed
Decompresses a bzip2 stream stored under a non-canonical suffix and verifies that bzip2 normally warns "Can't guess original name" on stderr but produces no such warning when -q is supplied, while still producing the correct decompressed output.
bzip2 quiet no stderr Original / libbz2 / usage-bzip2-quiet-no-stderr Passed
Runs bzip2 --quiet on a successful compress+test cycle and verifies the command emits no diagnostics on stderr while still producing a valid compressed stream.
bzip2 --best long alias produces the same output as -9 Original / libbz2 / usage-bzip2-r10-best-alias-equals-level-9 Passed
Compresses identical content with --best and with -9 to separate files and verifies the resulting .bz2 streams are byte-identical, confirming --best is exactly an alias for -9.
bzip2 --compress long flag is byte-equal to -z short flag Original / libbz2 / usage-bzip2-r10-long-compress-flag Passed
Compresses identical input twice via stdin, once with --compress and once with the short -z form, and verifies both .bz2 outputs are byte-identical to confirm the long-flag alias maps to the same operation.
bzip2 --force long flag overwrites an existing .bz2 target Original / libbz2 / usage-bzip2-r10-long-force-overwrite Passed
Pre-creates a placeholder .bz2 file and then runs bzip2 --force, verifying the placeholder is replaced with a valid compressed stream of the source.
bzip2 --keep long flag preserves the source file Original / libbz2 / usage-bzip2-r10-long-keep-flag Passed
Compresses a file using the --keep long-form flag and verifies both the original and the .bz2 output remain on disk.
bzip2 --quiet long flag suppresses noncritical messages Original / libbz2 / usage-bzip2-r10-long-quiet-no-banner Passed
Compresses content with --quiet and verifies stderr is empty while the compressed file is still produced and round-trips cleanly.
bzip2 --stdout long flag writes compressed bytes to stdout Original / libbz2 / usage-bzip2-r10-long-stdout-flag Passed
Uses bzip2 --stdout to emit a compressed stream to a captured file, leaving the input untouched, and verifies the captured stream round-trips to the original payload.
bzip2 --verbose long flag prints a ratio summary line on compress Original / libbz2 / usage-bzip2-r10-long-verbose-ratio-line Passed
Compresses a file with the --verbose long-form flag and verifies the per-file summary line on stderr contains the expected ratio, bits/byte, percent-saved and in/out byte fields.
bzip2 -d on a .tbz file strips the suffix to .tar Original / libbz2 / usage-bzip2-r10-tbz-suffix-decompress Passed
Renames a valid bz2-compressed file to use the .tbz suffix and verifies bzip2 -d strips the suffix to produce a .tar named output, matching the documented suffix table.
bzip2 -d on a .tbz2 file strips the suffix to .tar Original / libbz2 / usage-bzip2-r10-tbz2-suffix-decompress Passed
Renames a valid bz2-compressed file to use the .tbz2 suffix and verifies bzip2 -d strips the suffix to produce a .tar named output, matching the documented suffix table.
bzip2 -c1 combines stdout and level-1 in one short flag bundle Original / libbz2 / usage-bzip2-r11-combined-c-and-level Passed
Compresses to stdout with the bundled short flags -c1 (write to stdout, level 1) and confirms the captured stream decompresses byte-for-byte while leaving the input file untouched (no .bz2 sibling created).
bzip2 -dvc combined decompress, verbose, and stdout short flags Original / libbz2 / usage-bzip2-r11-combined-dvc-flags Passed
Decompresses a .bz2 to stdout with the bundled short flags -dvc and confirms the original bytes are emitted on stdout while the verbose summary line is written on stderr; the input .bz2 must remain on disk because -c suppresses removal.
bzip2 -kfv combined short flags keep, force, and trace verbosely Original / libbz2 / usage-bzip2-r11-combined-kfv-flags Passed
Pre-creates the .bz2 target then runs bzip2 -kfv with combined short flags and confirms the original input is retained, the existing target is overwritten, and the verbose ratio line is emitted on stderr.
bzip2 -- terminator allows compressing a dash-prefixed filename Original / libbz2 / usage-bzip2-r11-end-of-options-separator Passed
Creates a file whose name begins with a dash and uses the -- end-of-options separator so bzip2 treats the dash-prefixed token as a filename rather than a flag, then verifies the .bz2 sibling exists and decodes to the original content.
bzip2 --small long-form roundtrips a file Original / libbz2 / usage-bzip2-r11-small-long-flag Passed
Compresses a file with the --small long flag (memory-conservative decompressor mode flag) and verifies the .bz2 output decompresses back to the original payload byte-for-byte.
bzip2 --test long flag verifies a valid stream Original / libbz2 / usage-bzip2-r11-test-long-flag Passed
Compresses a payload, runs bzip2 --test on the resulting .bz2 file, and asserts the integrity check exits zero with no stdout output (long-form for -t).
bzcat reads .bz2 stream from stdin via shell redirection Original / libbz2 / usage-bzip2-r12-bzcat-stdin-redirect Passed
Compresses a payload, then runs bzcat with no arguments and stdin redirected from the .bz2 file (< file), and verifies the decoded stdout matches the original payload byte-for-byte.
bzdiff -q on two equal .bz2 archives is silent and exits zero Original / libbz2 / usage-bzip2-r12-bzdiff-q-quiet-equal Passed
Compresses identical content into two .bz2 files and runs "bzdiff -q" on the pair, asserting exit zero and no output on stdout or stderr (quiet mode for matching files).
bzgrep -h suppresses filename prefix across two .bz2 archives Original / libbz2 / usage-bzip2-r12-bzgrep-h-no-prefix Passed
Builds two .bz2 archives both containing a matching line and verifies that "bzgrep -h pattern file1.bz2 file2.bz2" emits the matched lines without the filename prefix that bzgrep would otherwise prepend in multi-file mode.
bzip2 --decompress --stdout long-form decompresses to stdout without consuming input Original / libbz2 / usage-bzip2-r12-decompress-stdout-flag Passed
Compresses a file with --keep, then decompresses it via "bzip2 --decompress --stdout" long-form flags and confirms the decoded bytes match the original while the source .bz2 file remains on disk untouched.
bzip2 --fast long alias produces same output as -1 Original / libbz2 / usage-bzip2-r12-fast-long-flag Passed
Compresses identical content with --fast and with -1 to separate streams via -c and confirms the resulting bytes are identical, exercising the documented --fast=-1 long alias.
bzip2 -k roundtrip preserves a 1MiB payload exactly Original / libbz2 / usage-bzip2-r12-keep-roundtrip-1mb Passed
Builds a deterministic 1 MiB payload, compresses with bzip2 -k (keep input), then decompresses the .bz2 to a fresh location with bzip2 -dc and asserts byte-equal sha256 against the original.
bzip2 -t with three valid bz2 files exits zero Original / libbz2 / usage-bzip2-r12-multi-file-test-all-pass Passed
Compresses three separate inputs into three .bz2 files and runs "bzip2 -t" on all three in one invocation, asserting exit zero and no stdout output.
bzip2 -dc on stdin decodes two concatenated streams in order Original / libbz2 / usage-bzip2-r12-stdin-multiple-streams-decode Passed
Concatenates two independently-compressed .bz2 streams and pipes the result into "bzip2 -dc" via stdin, asserting the decoded output equals the in-order concatenation of both source payloads.
bzip2 -t on a corrupted stream from stdin exits nonzero Original / libbz2 / usage-bzip2-r12-stdin-test-corrupt-fails Passed
Compresses a payload, flips a byte deep in the data block (offset 30) to corrupt it, and runs "bzip2 -t" with stdin redirected from the damaged file. The integrity check must exit nonzero.
bzip2 -c | bunzip2 -c pipeline preserves bytes exactly Original / libbz2 / usage-bzip2-r12-stdout-pipeline-roundtrip Passed
Pipes the input through bzip2 -c into bunzip2 -c in a single shell pipeline and verifies the round-trip output matches the source bytes via sha256, with no on-disk artifacts beyond the input.
bzcat reads concatenated bz2 streams from stdin Original / libbz2 / usage-bzip2-r13-bzcat-stdin-concatenated-streams Passed
Concatenates two distinct .bz2 streams and pipes the result into bzcat via stdin, then asserts the decoded stdout equals the in-order concatenation of both source payloads.
bzcat reads three concatenated bz2 streams from stdin Original / libbz2 / usage-bzip2-r13-bzcat-three-streams-stdin Passed
Builds a single concatenated .bz2 file from three independent compress invocations and decodes it through "bzcat" stdin redirection, asserting the decoded bytes are the in-order concatenation of all three sources.
bzdiff on two byte-identical bz2 files exits zero with no diff output Original / libbz2 / usage-bzip2-r13-bzdiff-equal-files-exit-zero Passed
Compresses the same payload twice into separate .bz2 files (decompressed contents are identical), runs bzdiff on the pair, and asserts exit zero plus an empty stdout (no diff output).
bzgrep -c reports a per-file matching line count Original / libbz2 / usage-bzip2-r13-bzgrep-c-count-flag Passed
Builds a .bz2 file with a known number of lines containing the pattern and runs "bzgrep -c PATTERN file.bz2", asserting the printed integer equals the expected match count.
bzgrep -c reports per-file match counts across two .bz2 files Original / libbz2 / usage-bzip2-r13-bzgrep-l-list-matching-files Passed
Creates two .bz2 files where exactly one contains the pattern and runs "bzgrep -c", asserting the matching file reports a positive count and the non-matching file reports 0. (Noble's bzgrep wrapper does not surface per-file names when run with -l on multiple inputs because it pipes through stdin; -c is the documented per-file aggregate that does work.)
bzip2recover pieces concatenated decode covers part of original payload Original / libbz2 / usage-bzip2-r13-bzip2recover-pieces-cover-payload Passed
Compresses a deterministic ~1 MiB input at -9 (multiple blocks), runs bzip2recover, then concatenates the recovered rec*.bz2 pieces into one stream, decodes that with bzcat, and asserts the recovered output is non-empty and starts with bytes that appear in the original input — confirming the recovery pipeline produces real decodable content.
bzmore prints decoded bz2 content when piped to a non-tty Original / libbz2 / usage-bzip2-r13-bzmore-pipe-decode Passed
Compresses a known payload and pipes "bzmore" output through cat (so bzmore is not attached to a tty) and asserts the visible content includes the source line.
bzip2 -kc emits stdout and leaves the input file untouched Original / libbz2 / usage-bzip2-r13-keep-stdout-leaves-input Passed
Runs "bzip2 -kc input" to write the compressed stream to stdout while keeping the input, asserts no input.bz2 sibling is created, the source file is byte-identical to its pre-run sha256, and the stdout stream is a valid bz2 file by header magic and "bzip2 -t".
bzip2 -1 produces a no-smaller archive than -9 on 1MB compressible input Original / libbz2 / usage-bzip2-r13-level-size-monotonic-1mb Passed
Compresses a 1 MiB highly-repetitive payload at levels -1 and -9 separately and asserts the level-9 output is no larger than the level-1 output (typically strictly smaller for compressible content), capturing the documented level-vs-size relationship.
bzip2 -s small-memory decompress roundtrips a payload Original / libbz2 / usage-bzip2-r13-small-mode-roundtrip Passed
Compresses a payload with default settings, then decodes it with "bzip2 -s -dc" (small-memory mode) and verifies the decoded stdout matches the source byte-for-byte via sha256.
bzcat decodes a stream coming through bash process substitution Original / libbz2 / usage-bzip2-r14-bzcat-process-substitution-roundtrip Passed
Pipes "bzip2 -c" output through bash process substitution into bzcat (bzcat <(bzip2 -c file)) and asserts the decoded stdout matches the source payload sha256, exercising bzcat reading from a process-substitution fifo file argument.
bzdiff on differing .bz2 archives exits 1 and emits diff output Original / libbz2 / usage-bzip2-r14-bzdiff-different-exits-one Passed
Compresses two distinct payloads, runs bzdiff on the resulting .bz2 pair, and asserts the command exits 1 (the diff exit code for differences) with non-empty stdout, complementing the equal-files exit-zero r13 case.
bzgrep -c reports per-file counts across two .bz2 archives Original / libbz2 / usage-bzip2-r14-bzgrep-c-multi-file-counts Passed
Builds two .bz2 archives with different match counts for the same pattern, runs "bzgrep -c PATTERN file1.bz2 file2.bz2", and asserts the output has two lines each prefixed with the input filename and trailing colon-separated count, exercising bzgrep's multi-file -c reporting.
bzgrep -E extended regex with alternation matches expected lines Original / libbz2 / usage-bzip2-r14-bzgrep-extended-regex Passed
Builds a .bz2 archive containing several lines and runs "bzgrep -Ec 'apple|cherry'" asserting exactly two lines match (alternation operator works only under -E), exercising the extended-regex flag forwarded through bzgrep.
bzgrep -i matches case-insensitively across mixed-case lines Original / libbz2 / usage-bzip2-r14-bzgrep-i-case-insensitive Passed
Builds a .bz2 archive with a payload mixing "Apple", "APPLE", and "apple", runs "bzgrep -ic apple file.bz2" and asserts the count is 3, exercising the case-insensitive match flag.
bzmore output piped through cat preserves payload bytes Original / libbz2 / usage-bzip2-r14-bzmore-through-cat-pipe Passed
Compresses a multi-line payload, runs "bzmore" with stdin tied to /dev/null and stdout piped through cat, asserts the captured output contains every source line marker. Distinct from the r13 bzmore pipe-decode case by validating ALL lines (10) rather than two markers.
bzip2 -d round-trips a zero-byte input back to zero bytes Original / libbz2 / usage-bzip2-r14-decompress-empty-stream-yields-empty Passed
Compresses a zero-byte input file with "bzip2 -c" producing a small but non-empty .bz2 stream (containing the empty-block end marker), then decompresses with "bzip2 -dc" and asserts the recovered output is exactly zero bytes — pinning empty-input round-trip behavior.
bzip2 --help banner contains a "Version 1.0" line Original / libbz2 / usage-bzip2-r14-help-shows-version-line Passed
Runs "bzip2 --help" and asserts stdout/stderr include a "Version 1.0" prefix substring, confirming the help banner identifies the bzip2 1.0.x family on Ubuntu 24.04.
bzip2 -q quiets warnings on a non-canonical-suffix output decode Original / libbz2 / usage-bzip2-r14-quiet-suppresses-warning Passed
Decompresses a .bz2 stream from a file whose extension is not .bz2 (so bzip2 normally complains) using "bzip2 -d -q -c", asserts the command exits zero with empty stderr, and that stdout matches the original payload sha256 — confirming -q silences the suffix-related warning chatter without affecting decode correctness.
bzip2 -t accepts three valid .bz2 files in one invocation Original / libbz2 / usage-bzip2-r14-test-three-files-all-pass Passed
Compresses three distinct payloads, runs "bzip2 -t" with all three .bz2 files supplied as positional arguments in one call, and asserts the command exits zero with empty stdout (test mode produces no output on success).
bzcat decodes eight .bz2 files in one call concatenated to stdout Original / libbz2 / usage-bzip2-r15-bzcat-eight-files-stdout-concat Passed
Compresses eight distinct payloads to .bz2 files, runs "bzcat f1.bz2 ... f8.bz2" with all eight as positional arguments, and asserts the stdout sha256 equals the byte-wise concatenation of the eight original payloads — exercising bzcat's many-file argument path beyond the existing two/three-file cases.
bzcmp on differing .bz2 archives exits 1 and emits a non-empty diff report Original / libbz2 / usage-bzip2-r15-bzcmp-byte-position-output Passed
Compresses two payloads that share a common prefix and diverge at a known byte offset, runs "bzcmp" on the resulting .bz2 pair, and asserts the command exits 1 with non-empty output. (Noble's bzcmp wrapper invokes cmp without a fixed output format — assert exit code + non-empty report rather than the exact "differ: byte N, line M" template.)
bzdiff compares a .bz2 archive against an uncompressed file directly Original / libbz2 / usage-bzip2-r15-bzdiff-mixed-bz2-and-plain-arg Passed
Compresses one payload to .bz2, leaves a second payload uncompressed on disk, runs "bzdiff a.txt.bz2 b.txt" with one compressed and one plain argument, and asserts the command exits 1 with a non-empty diff because the contents differ — confirming bzdiff transparently decodes only the .bz2 side of a mixed-pair invocation.
bzgrep --color=never emits matches without ANSI escape sequences Original / libbz2 / usage-bzip2-r15-bzgrep-color-never-flag Passed
Builds a .bz2 archive containing a payload with one obvious match, runs "bzgrep --color=never apple file.bz2", and asserts the output is non-empty, contains the literal match line, and contains zero ESC (0x1b) bytes — confirming the --color=never flag is forwarded through bzgrep to grep without leaking color escapes.
bzgrep -h with two .bz2 inputs strips the filename prefix from every match line Original / libbz2 / usage-bzip2-r15-bzgrep-h-no-prefix-multifile Passed
Builds two .bz2 archives each containing a matching pattern, runs "bzgrep -h apple file1.bz2 file2.bz2", and asserts the output contains exactly two lines (one per match), neither of which contains a filename prefix or colon — confirming -h suppresses the per-line filename header that bzgrep would otherwise add when given multiple inputs. Distinct from r12-bzgrep-h-no-prefix which uses a single file.
bzgrep -n with two .bz2 files prefixes filename and line number per match Original / libbz2 / usage-bzip2-r15-bzgrep-line-number-multifile Passed
Builds two .bz2 archives each containing the matching pattern at distinct line offsets, runs "bzgrep -n PATTERN file1.bz2 file2.bz2" with both files as positional arguments, and asserts the output contains a "<filename>:<lineno>:" prefix for each file's match — exercising the combined multi-file plus -n reporting (distinct from the single-file -n case).
bzip2 double-encode then double-decode pipeline preserves the source bytes Original / libbz2 / usage-bzip2-r15-bzip2-double-compress-stdout-pipe Passed
Pipes a payload through "bzip2 -c | bzip2 -c" producing a doubly-compressed .bz2.bz2 stream, then reverses the pipe through "bunzip2 -c | bunzip2 -c" and asserts the recovered output matches the source sha256. Also asserts the doubly-compressed blob's first three bytes are still the bzip2 magic "BZh", confirming the outer encoder produced a real bzip2 stream over the inner one.
bzip2 -dq on a .bz2 file with a wrong rename emits a warning that -q would have suppressed Original / libbz2 / usage-bzip2-r15-bzip2-q-suffix-warning-suppressed Passed
Compresses a payload, renames the .bz2 file to an unrecognised .dat suffix, then runs two parallel decode invocations writing to disk (not stdout, where bzip2 omits the suffix warning): one with "bzip2 -d" (no quiet flag) capturing stderr, and one with "bzip2 -d -q" (quiet flag). Asserts the loud invocation prints non-empty stderr (the "Can't guess original name" warning), the quiet invocation prints empty stderr, and both produce decoded outputs whose sha256 matches the original — pinning that -q only changes warning chatter, not decode correctness.
bzip2 stdin compression piped through tee to a file decompresses cleanly Original / libbz2 / usage-bzip2-r15-bzip2-stdin-tee-then-bunzip2 Passed
Pipes a payload through "bzip2 -c", through "tee" (writing the compressed bytes to a sidecar file as well as forwarding them), into "bunzip2 -c" on the other end of the pipe. Asserts both the on-disk tee'd .bz2 and the in-line decoded stdout produce the same byte-equivalent recovered payload sha256 — exercising bzip2 as both ends of a tee'd shell pipeline.
bzip2 -vv reports a numeric bits/byte ratio strictly less than 8 Original / libbz2 / usage-bzip2-r15-bzip2-vv-bits-per-byte-numeric Passed
Compresses a highly redundant 64KiB payload with "bzip2 -vv -c", captures stderr, extracts the numeric bits/byte value from the verbose output, and asserts it is a positive number strictly less than 8 (the upper bound for any valid encoding) and greater than zero — pinning that the ratio reported by -vv is well-formed numeric output, distinct from the existing vv-double-verbose case which only checks the literal "bits/byte" substring is present.
bzcat decodes a bz2 stream from stdin via pipeline Original / libbz2 / usage-bzip2-r16-bzcat-stdin-pipe Passed
Streams a bzip2-compressed payload into bzcat over a pipeline and asserts the decoded stdout matches the original input byte-for-byte, locking in the pure-stdin pipe path without temporary archive files on disk.
bzcat preserves argument order when decoding three separate bz2 files Original / libbz2 / usage-bzip2-r16-bzcat-three-files-concat-order Passed
Compresses three distinct payloads into separate .bz2 files and asserts bzcat decoded in the supplied argument order produces line-for-line the concatenation of the original payloads in that order — exercising bzcat's positional argument semantics with a stable line-based assertion.
bzdiff reports identical content between two bz2 archives of the same payload Original / libbz2 / usage-bzip2-r16-bzdiff-archives-equal Passed
Builds two bz2 archives from byte-identical input and asserts bzdiff exits 0 with no output, locking in the equal-payload path of the bzdiff comparator across distinct archive files.
bzgrep -F finds a fixed string in two of three bz2 files Original / libbz2 / usage-bzip2-r16-bzgrep-multi-file-fixed-string Passed
Compresses three distinct payloads where two contain a needle and one does not, runs bzgrep -F across all three, and asserts the output contains matches from both expected files and never from the negative one — without depending on filename prefixing.
bzip2recover writes rec00001 fragment for a truncated archive Original / libbz2 / usage-bzip2-r16-bzip2recover-truncated-fragment Passed
Compresses a multi-line payload, truncates the resulting .bz2 to half its size, runs bzip2recover, and asserts a rec*0001*.bz2 fragment file is produced in the working directory — locking in bzip2recover's standard fragment naming for partially-readable archives.
bzip2 --help output mentions compression and decompression options Original / libbz2 / usage-bzip2-r16-help-mentions-compression-levels Passed
Runs bzip2 --help and asserts the usage banner mentions both "compress" and "decompress" tokens, locking in the user-facing help text shape without depending on column layout or exact wording.
bzip2 -k keeps the input file alongside the compressed output Original / libbz2 / usage-bzip2-r16-k-flag-keeps-original Passed
Compresses a file with bzip2 -k and asserts both the original input and the .bz2 output exist afterwards, locking in the keep-input flag behavior that distinguishes -k from the default "consume the input" path.
bzip2 -9 compresses a repetitive payload no larger than bzip2 -1 Original / libbz2 / usage-bzip2-r16-level-9-smaller-than-level-1 Passed
Compresses an identical highly-repetitive payload at -1 and -9, then asserts the -9 output size is less than or equal to the -1 output size — covering bzip2's compression-level dial without depending on exact byte counts.
bzip2 -t returns 0 on a valid .bz2 archive Original / libbz2 / usage-bzip2-r16-test-valid-archive Passed
Compresses a payload, then runs bzip2 -t on the resulting archive and asserts the exit code is 0 — locking in the integrity-test path that distinguishes valid archives from truncated or corrupted ones.
bzip2 --version banner mentions program name and version year string Original / libbz2 / usage-bzip2-r16-version-banner-shape Passed
Runs bzip2 --version and asserts the banner names the program and includes a "Copyright" line, locking in the upstream banner shape that the Ubuntu 24.04 bzip2 emits without committing to a specific version number.
bunzip2 decompresses a target referenced by absolute path Original / libbz2 / usage-bzip2-r17-bunzip2-absolute-path-target Passed
Compresses a payload, moves the archive to a deeper subdirectory, then invokes bunzip2 with the absolute path to the archive and asserts the decompressed file appears alongside it stripped of the .bz2 suffix.
bunzip2 -k retains the .bz2 archive alongside the decompressed output Original / libbz2 / usage-bzip2-r17-bunzip2-k-keeps-archive Passed
Compresses a payload then runs bunzip2 -k against the archive and asserts both the decompressed file and the original .bz2 archive exist afterward, locking in the keep-original flag for the decompression direction.
bzcat on a bz2 of an empty file emits zero bytes Original / libbz2 / usage-bzip2-r17-bzcat-empty-archive Passed
Compresses an empty file with bzip2 to produce a non-empty archive, then runs bzcat against it and asserts the stdout contains exactly zero bytes — locking in the empty-payload contract distinct from a truncated archive.
bzdiff reports differences when two archives decompress to different content Original / libbz2 / usage-bzip2-r17-bzdiff-different-archives Passed
Builds two bz2 archives from different payloads and runs bzdiff against them, asserting the exit code is 1 and the stdout mentions "differ" — locking in bzdiff's diff-style behavior for unequal decompressed content.
bzgrep -c reports the integer count of matches inside a bz2 archive Original / libbz2 / usage-bzip2-r17-bzgrep-c-counts-matches Passed
Builds a bz2 archive whose decompressed body contains exactly four "needle" lines among other content, runs bzgrep -c against it, and asserts the lone stdout token is the integer 4 — locking in the -c count-mode output shape.
bzip2recover writes per-block rec*.bz2 fragments for an intact archive Original / libbz2 / usage-bzip2-r17-bzip2recover-valid-archive Passed
Compresses a large payload so the resulting .bz2 contains several blocks, runs bzip2recover against the intact archive (no truncation), and asserts at least one rec*.bz2 fragment is produced — exercising the block-extraction path on a healthy archive rather than a corrupted one.
bzip2 --quiet writes no stderr noise while -v emits progress text Original / libbz2 / usage-bzip2-r17-quiet-suppresses-stderr Passed
Compresses the same payload twice — once with --quiet and once with -v — and asserts the --quiet invocation produces an empty stderr file while the -v invocation produces a non-empty stderr, locking in the verbosity contrast between the two flags.
bzip2 -c stdin pipe roundtrip preserves SHA-256 with no temp file Original / libbz2 / usage-bzip2-r17-stdin-pipe-roundtrip-sha256 Passed
Pipes a payload into bzip2 -c and immediately into bzip2 -dc, capturing the recovered bytes on stdout, and asserts the SHA-256 of the recovered stream equals the SHA-256 of the original input — locking in a purely streaming roundtrip free of intermediate archive files.
bunzip2 preserves the standard 0644 file mode after decompression Original / libbz2 / usage-bzip2-r18-bunzip2-leaves-mode-644 Passed
Creates an input file explicitly chmod 644, compresses it with bzip2, decompresses with bunzip2, and asserts the recovered file has mode 644 — locking in unix mode preservation across the compress/decompress roundtrip on noble.
bzcat reproduces every 0..255 byte value through a stdin pipe Original / libbz2 / usage-bzip2-r18-bzcat-binary-256-bytes-stdout Passed
Builds a 256-byte file containing each octet from 0 to 255 exactly once, compresses it with bzip2 -c through stdin, then decompresses with bzcat on the resulting archive and asserts the recovered bytes are identical (sha256 match) — locking in binary fidelity across the full byte range.
bzcat feeds a bzip2-compressed tar stream into tar -tf for listing Original / libbz2 / usage-bzip2-r18-bzcat-via-tar-stream Passed
Creates three files in a directory, packs them into a tar archive, compresses the tar with bzip2, then pipes bzcat output into tar -tf and asserts each of the three member filenames appears in the listing — exercising the cli stream contract for archive consumers.
bzcmp reports the first differing byte position when comparing two compressed payloads Original / libbz2 / usage-bzip2-r18-bzcmp-skip2-byte Passed
Builds two payloads that differ only at offset 5, compresses both, runs bzcmp on the resulting archives without suppression flags, and asserts the output contains "differ: byte" plus a positive byte offset — locking in the human-readable diff line.
bzgrep -l lists only the archives that contain the pattern Original / libbz2 / usage-bzip2-r18-bzgrep-files-with-match Passed
Compresses two text files where only one contains the search pattern, runs bzgrep -l with both archives, and asserts only the matching archive's path appears on stdout while the non-matching archive does not — locking in the files-with-match flag semantics across multi-file invocation.
bzgrep -v across two archives emits lines that do not match the pattern Original / libbz2 / usage-bzip2-r18-bzgrep-v-invert-multifile Passed
Builds two bz2-compressed files each with both matching and non-matching lines, runs bzgrep -v with a multi-file invocation, and asserts the output omits the matching lines but contains the non-matching ones from both archives — locking in invert-match across multi-archive iteration.
bzip2 -d decompresses an archive in place and removes the .bz2 input Original / libbz2 / usage-bzip2-r18-decompress-uppercase-d-flag Passed
Compresses a small text payload with bzip2, runs bzip2 -d against the archive, and asserts the original filename exists with the original bytes restored while the .bz2 archive is gone — locking in the canonical in-place decompression contract.
bzip2 -1 and bzip2 -9 produce archives where level 9 is no larger than level 1 Original / libbz2 / usage-bzip2-r18-level-1-vs-9-size-ordering Passed
Generates a moderately compressible 64 KiB payload of repeated structured text, compresses two copies at -1 and -9 respectively, and asserts level-9 size is less than or equal to level-1 size — locking in the monotonicity of higher levels never being worse on compressible input.
bzip2 -c and bunzip2 -c chain through a single shell pipeline preserving content Original / libbz2 / usage-bzip2-r18-stdin-stdout-pipe-chain Passed
Generates structured text, pipes it through bzip2 -c into bunzip2 -c, captures the result, and asserts the recovered payload is identical to the original line for line and byte for byte (sha256 match) — locking in the pure-pipe streaming roundtrip without intermediate files.
bzip2 -t on a valid archive exits zero and leaves no payload on stdout Original / libbz2 / usage-bzip2-r18-test-flag-valid-rc-zero Passed
Compresses a small text file to bzip2, runs bzip2 -t against the archive capturing stdout, and asserts the command exits with status zero and writes zero bytes to stdout — locking in the integrity-check command being silent on stdout for healthy archives.
bzcat decompresses a file made from five concatenated bzip2 streams Original / libbz2 / usage-bzip2-r19-bzcat-five-stream-concat Passed
Compresses five distinct text payloads separately, concatenates the five .bz2 outputs into a single archive, decompresses with bzcat, and asserts the recovered output contains each of the five distinct markers in order - locking in multi-stream decompression at a higher stream count than existing tests.
bzcmp reports identical content with exit 0 across two distinct compression levels Original / libbz2 / usage-bzip2-r19-bzcmp-equal-files-rc0 Passed
Compresses the same plain payload twice (level -1 and level -9) into separately-named .bz2 archives, runs bzcmp on the pair, and asserts the exit status is 0 with empty stdout - locking in compression-level-agnostic equality on decompressed content.
bzdiff exits 1 and prints a unified diff when archive contents differ Original / libbz2 / usage-bzip2-r19-bzdiff-rc1-content-differs Passed
Compresses two text files differing in a single line, runs bzdiff capturing both rc and stdout, and asserts the exit code is 1 with stdout containing the differing tokens prefixed by "<" and ">" - locking in bzdiff exit semantics and content output for non-equal inputs.
bzgrep with -e and a single-character pattern returns every line containing that char Original / libbz2 / usage-bzip2-r19-bzgrep-empty-pattern-via-e Passed
Compresses a text where two of four lines contain the letter "x", runs bzgrep -e 'x' on the archive, and asserts exactly two matching lines are returned - locking in the -e flag pattern delivery to bzgrep over compressed input.
bzgrep -n prefixes matching lines with the original 1-based line number Original / libbz2 / usage-bzip2-r19-bzgrep-n-line-numbers Passed
Compresses a six-line text where the match falls on line 4, runs bzgrep -n 'target' on the archive, and asserts the captured output begins with "4:" - locking in line-number prefixing of bzgrep over the original (uncompressed) line offsets.
bzgrep -w matches a whole word and skips substring-only occurrences Original / libbz2 / usage-bzip2-r19-bzgrep-w-word-boundary Passed
Compresses a small text file containing the tokens "cat", "catalog", and "scatter" on separate lines with bzip2, runs bzgrep -w 'cat' on the archive, and asserts the output contains the bare-word line but not the substring lines - locking in word-boundary matching on compressed input.
bzip2 -k with stdin input writes to stdout without creating extra files in cwd Original / libbz2 / usage-bzip2-r19-bzip2-stdin-keep-flag-noop Passed
Runs bzip2 -k -c over a stdin redirection in a clean working directory, captures the compressed bytes to a file, and asserts no .bz2 or other artifacts appear in cwd while the captured archive decompresses back to the original payload - locking in stdin-mode neutrality of the -k flag.
bzip2 -t rejects an archive whose final byte has been removed Original / libbz2 / usage-bzip2-r19-bzip2-test-rejects-truncated-tail Passed
Compresses a payload, truncates the archive by one byte from the tail, then runs bzip2 -t on the damaged file and asserts a non-zero exit code with the original (untruncated) archive still passing -t with rc 0 - locking in integrity detection of tail truncation.
bzip2 -d via stdin recovers a payload compressed at block size 1 Original / libbz2 / usage-bzip2-r19-decompress-stdin-block-1 Passed
Compresses a 16 KiB payload of repeating mixed-case text using bzip2 -1 to stdout, pipes the archive into bzip2 -dc, and asserts the recovered bytes are byte-identical (sha256 match) to the source - locking in stdin decompression of small-block archives.
bzip2 round-trips UTF-8 multibyte sequences byte-for-byte Original / libbz2 / usage-bzip2-r19-roundtrip-utf8-multibyte Passed
Writes a text containing multibyte UTF-8 sequences (Greek, CJK, emoji-range BMP), compresses with bzip2 then decompresses to a new file, and asserts the recovered bytes match the source by sha256 - locking in 8-bit-clean handling of multibyte payloads.
bzcat on an archive of an empty file emits zero bytes to stdout Original / libbz2 / usage-bzip2-r20-bzcat-empty-stream-yields-zero-bytes Passed
Compresses a zero-byte file with bzip2, then runs bzcat on the resulting archive and asserts the captured stdout is exactly 0 bytes long via wc -c, exercising the zero-payload case of bzcat distinct from prior empty-archive tests that asserted via diff.
bzcmp returns rc 0 and empty stdout on two archives compressed from the same source Original / libbz2 / usage-bzip2-r20-bzcmp-identical-archives-rc-zero Passed
Writes a source payload, compresses it into two distinct archive files at the same level, then runs bzcmp on the two archives and asserts rc 0 with empty stdout since the underlying decompressed bytes are identical, exercising bzcmp's content-equality semantics on identical compressed inputs distinct from prior different-exit tests.
bzdiff returns rc 0 for two archives with identical payloads compressed at different levels Original / libbz2 / usage-bzip2-r20-bzdiff-three-archives-pairwise-equal Passed
Writes the same source payload, compresses it twice with bzip2 at -3 and at -7 into distinct archive files, then runs bzdiff between the two archives and asserts rc 0 since the decompressed payloads are identical, exercising bzdiff's content-equality semantics across mixed compression levels distinct from prior same-level or three-way tests.
bzgrep with a start-anchor pattern returns only lines beginning with the token Original / libbz2 / usage-bzip2-r20-bzgrep-matches-anchor-start Passed
Compresses a text where two of four lines start with the literal "ERROR " (the rest contain it mid-line or not at all), runs bzgrep '^ERROR ' on the archive, and asserts exactly two matching lines are returned with both starting with "ERROR ", exercising start-of-line anchoring through bzgrep on compressed input distinct from prior fixed-string, word-boundary, or empty-pattern tests.
bzgrep prefixes every match line with the archive filename when given multiple archives Original / libbz2 / usage-bzip2-r20-bzgrep-prints-archive-name-when-multiple-files Passed
Compresses two archives each containing a single line that matches the pattern "needle", runs bzgrep 'needle' against both archive names, and asserts every output line begins with one of the two archive filenames followed by a colon, exercising the default filename-prefix behavior in multi-file mode distinct from prior --no-filename (-h) tests.
bzip2 -dk decompresses while keeping the source archive intact and recovers payload Original / libbz2 / usage-bzip2-r20-bzip2-decompress-keep-archive-with-d-uppercase Passed
Compresses a payload, then runs bzip2 -dk on the archive to decompress while keeping the archive (-k), and asserts both the original archive and the decompressed plain file are present after the operation with the plain file content matching the source - exercising the combination of the keep flag with the lowercase-d decompress flag in a single short-option cluster -dk distinct from the r18 in-place -d test that removes the archive.
bzip2 --help output mentions the --best long option Original / libbz2 / usage-bzip2-r20-bzip2-help-shows-block-size-flag Passed
Runs bzip2 --help and asserts the captured help text contains the literal substring "--best" since the help banner lists long-option aliases for compression-level shortcuts, exercising help-banner content distinct from prior version-line or compression-levels-mention tests.
bzip2 at level -5 compresses and decompresses 1 MiB of structured data losslessly Original / libbz2 / usage-bzip2-r20-bzip2-level-5-roundtrip-1mb Passed
Generates exactly 1 MiB of structured byte-pattern data, compresses it with bzip2 -5 -c, decompresses with bzip2 -dc, and asserts the recovered bytes equal the source via cmp - locking in a mid-range compression-level roundtrip distinct from prior tests that focus on -1, -2, -7, or -9.
bzip2recover on a valid archive produces files named rec*ARCHIVE* Original / libbz2 / usage-bzip2-r20-bzip2-recover-yields-rec-prefix-files Passed
Compresses a 4 KiB deterministic payload into a single archive, runs bzip2recover on the archive, and asserts at least one output file matches the canonical "rec*" naming pattern, exercising the recover utility's naming convention on a valid (non-corrupt) archive distinct from prior tests that asserted block-count or piece-cover behavior.
bzip2 -c | bzip2 -dc pipeline preserves the SHA-256 of a deterministic 16 KiB payload Original / libbz2 / usage-bzip2-r20-bzip2-stdout-pipeline-sha256-matches-source Passed
Generates 16384 bytes of deterministic binary content, pipes it through bzip2 -c into bzip2 -dc, and asserts the SHA-256 of the pipeline output equals the SHA-256 of the source, exercising the chained compress-then-decompress pipeline fidelity via cryptographic-checksum identity at a non-trivial size distinct from prior fixed-string roundtrips.
bunzip2 -q produces no stderr output for a clean archive Original / libbz2 / usage-bzip2-r21-bunzip2-q-quiet-stderr Passed
Compresses a small payload, decompresses with bunzip2 -q -k to stdout, and asserts the captured stderr stream is empty - locking in bunzip2's -q (quiet) behavior on the bunzip2 wrapper (existing tests cover bzip2 -q but not bunzip2 -q on stderr emptiness).
bzcat -f on a non-bzip2 file passes through unchanged Original / libbz2 / usage-bzip2-r21-bzcat-force-missing-no-args Passed
Writes a plain (non-bzip2) text file and runs bzcat -f against it, asserting the captured output equals the source bytes - locking in the -f (force) pass-through behavior of bzcat on uncompressed input, distinct from other -f tests that target bzip2 itself.
bzdiff -q on two archives with identical contents exits 0 with no output Original / libbz2 / usage-bzip2-r21-bzdiff-q-equal-archives-rc-zero Passed
Compresses identical content into two distinct archives, runs bzdiff -q on them, and asserts the exit code is 0 with no stdout/stderr output - locking in the -q quiet flag's silent-success behavior distinct from the existing bzdiff-q-flag test which only checks rc on differing files.
bzgrep -A 2 prints two trailing context lines after each match Original / libbz2 / usage-bzip2-r21-bzgrep-a2-after-context-lines Passed
Compresses a six-line payload and runs bzgrep -A 2 looking for a unique pattern on line 3, then asserts the output contains the match line plus the next two lines verbatim - locking in -A's count semantics specifically (existing batch11 after-context test does not pin output to a numeric line count).
bzgrep -C 1 prints one line of leading and trailing context Original / libbz2 / usage-bzip2-r21-bzgrep-context-flag-symmetric Passed
Compresses a five-line payload, runs bzgrep -C 1 on a unique middle line, and asserts the captured output contains exactly three lines (prev + match + next) - locking in -C's symmetric context behavior which is distinct from -A / -B alone.
bzgrep -x matches only when the pattern spans the entire line Original / libbz2 / usage-bzip2-r21-bzgrep-x-line-regex-anchor Passed
Compresses a four-line payload containing both partial and full matches of a token, runs bzgrep -x 'token' and asserts only the line equal to 'token' is reported - locking in the -x whole-line match semantics specifically (existing bzgrep tests cover -F / -w / -E but not -x line anchoring).
bzip2recover output recXXXX files each decode under bzip2 -t Original / libbz2 / usage-bzip2-r21-bzip2recover-rec-files-decode-individually Passed
Builds a multi-block archive by compressing a 1MB random payload at -9 -1 block size, runs bzip2recover, and asserts each resulting recXXXX.bz2 file passes bzip2 -t independently - locking in the per-block recovery file integrity contract (existing recover tests check piece count or pieces-cover-payload but not per-piece -t pass).
bzip2 -d -s small-mode decompresses a level-9 archive byte-for-byte Original / libbz2 / usage-bzip2-r21-small-flag-roundtrip Passed
Compresses a 256KB payload with bzip2 -9, then decompresses with bzip2 -d -s (small/reduced-memory mode) into stdout and asserts the recovered bytes match the original SHA-256 - locking in the -s reduced-memory decompression code path which is distinct from the default decompressor.
bzip2 stdin->stdout roundtrip preserves a 512KB deterministic payload Original / libbz2 / usage-bzip2-r21-stdin-decompress-large-deterministic Passed
Generates a 512KB deterministic payload using printf and seq, pipes it through bzip2 -c | bzip2 -dc and asserts the SHA-256 of the recovered stream matches the source - locking in a larger-than-typical pipe-roundtrip distinct from prior 1MB random or tiny tests by using a deterministic payload of a different size.
bzip2 -t accepts concatenated multi-stream input on stdin Original / libbz2 / usage-bzip2-r21-test-multistream-stdin Passed
Builds three independent bzip2 streams by compressing three different small payloads and concatenating them into one .bz2 blob, then pipes the blob into bzip2 -t (test-only) on stdin and asserts the exit code is 0 - locking in stdin-piped integrity checking across multi-stream archives.
bzip2 recompresses file Original / libbz2 / usage-bzip2-recompress-file Passed
bzip2 recover listing Original / libbz2 / usage-bzip2-recover-listing Passed
bzip2 round trip preserves chmod 600 Original / libbz2 / usage-bzip2-roundtrip-preserves-mode-600 Passed
Compresses a 0600-mode file in place and decompresses it back, verifying bzip2 carries the restrictive permission bits across the round trip.
bzip2 round-trip preserves restrictive 0600 mode bits Original / libbz2 / usage-bzip2-roundtrip-preserves-setuid Passed
Marks a regular file with chmod 0600 (owner-only read/write), compresses it in place, decompresses it back, and verifies bzip2 carries the restrictive mode bits across the round trip on both the .bz2 and the restored plaintext (the standard mode-preservation path; bzip2 deliberately strips setuid/setgid for safety).
bzip2 round trip via symlink target Original / libbz2 / usage-bzip2-roundtrip-via-symlink Passed
Points a symlink at a real file and verifies bzip2 -c through the symlink reads the target's bytes and produces a stream that decompresses back to the original payload.
bzip2 sample1 fixture Original / libbz2 / usage-bzip2-sample1-fixture Passed
bzip2 sample2 fixture Original / libbz2 / usage-bzip2-sample2-fixture Passed
bzip2 sample3 fixture Original / libbz2 / usage-bzip2-sample3-fixture Passed
bzip2 sample three stdout Original / libbz2 / usage-bzip2-sample3-stdout Passed
bzip2 round-trip preserves binary sha256 Original / libbz2 / usage-bzip2-sha256-roundtrip-binary Passed
Compresses random binary input and verifies the decompressed sha256 matches the original byte-for-byte.
bzip2 short version flag Original / libbz2 / usage-bzip2-short-version-flag Passed
Runs bzip2 -V (short flag) and verifies the version banner identifies the block-sorting compressor.
bzip2 small block Original / libbz2 / usage-bzip2-small-block Passed
bzip2 -s small mode decompresses correctly Original / libbz2 / usage-bzip2-small-mode-decompress Passed
Decompresses a bzip2 stream with the low-memory -s flag and verifies bytes match the original payload.
bzip2 space filename compress Original / libbz2 / usage-bzip2-space-filename-compress Passed
bzip2 space filename decompress Original / libbz2 / usage-bzip2-space-filename-decompress Passed
bzip2 stdin file output Original / libbz2 / usage-bzip2-stdin-file-output Passed
bzip2 -d rejects non-bzip2 stdin Original / libbz2 / usage-bzip2-stdin-no-output-file-on-error Passed
Pipes plain text into bzip2 -d and verifies the command exits non-zero, reports a not-a-bzip2-file error, and produces no decoded output bytes on stdout.
bzip2 pipeline roundtrip Original / libbz2 / usage-bzip2-stdin-pipe-roundtrip Passed
Pipes bzip2 -c output directly into bzip2 -dc and verifies the round-tripped payload matches the source byte-for-byte.
bzip2 stdin roundtrip Original / libbz2 / usage-bzip2-stdin-roundtrip Passed
Compresses stdin with bzip2, decompresses the resulting stream, and verifies the restored plaintext payload.
bzip2 stdin stdout round trip Original / libbz2 / usage-bzip2-stdin-stdout-roundtrip Passed
Compresses data from stdin with bzip2, decompresses to stdout, and verifies the original payload returns intact.
bzip2 stdout keep input Original / libbz2 / usage-bzip2-stdout-keep-input Passed
Compresses a file to stdout with bzip2 -k, keeps the original input, and verifies both original and restored output content.
bzip2 piped directly to bunzip2 Original / libbz2 / usage-bzip2-stdout-pipe-into-bunzip2 Passed
Pipes bzip2 -c output straight into bunzip2 -c without any intermediate file and verifies the decoded byte stream matches the original payload exactly.
bzip2 -c piped into bzip2 -t - Original / libbz2 / usage-bzip2-stdout-pipeline-tc Passed
Pipes plaintext into bzip2 -c (compress to stdout) and immediately into bzip2 -t - (test the stream from stdin), verifying the pipeline reports a healthy stream and that an out-of-band decompression of the captured pipeline output reproduces the input bytes.
bzip2 stdout spaced file Original / libbz2 / usage-bzip2-stdout-space-file Passed
Compresses a spaced filename to stdout with bzip2 and verifies a later decompression round trip.
bzip2 stdout stream Original / libbz2 / usage-bzip2-stdout-stream Passed
bzip2 -c piped through tee Original / libbz2 / usage-bzip2-stdout-tee-two-sinks Passed
Streams bzip2 -c output through tee into two separate sinks and verifies both files are byte-identical and decompress back to the original payload.
tar -j round-trips through bzip2 Original / libbz2 / usage-bzip2-tar-j-stream-roundtrip Passed
Creates a bzip2-compressed tarball with tar -cjf and extracts it with tar -xjf, verifying every member's bytes match the originals.
tar -tjf lists members of a bzip2 archive Original / libbz2 / usage-bzip2-tar-tjf-listing Passed
Builds a bzip2-compressed tarball and verifies tar -tjf prints exactly the expected member names in order without extracting.
bzip2 -t rejects empty file Original / libbz2 / usage-bzip2-test-empty-file Passed
Runs bzip2 -t on a zero-byte file and verifies it fails with a non-zero exit status and a diagnostic on stderr.
bzip2 test multiple files Original / libbz2 / usage-bzip2-test-multi-files Passed
Runs bzip2 -t on two compressed files in a single invocation and verifies both pass the integrity check.
bzip2 -tq quiet test mode Original / libbz2 / usage-bzip2-test-quiet-suppresses-banner Passed
Runs bzip2 -tq on a known-good archive and verifies the integrity check passes silently with no output on stdout or stderr.
bzip2 tests sample1 fixture Original / libbz2 / usage-bzip2-test-sample1 Passed
bzip2 tests sample2 fixture Original / libbz2 / usage-bzip2-test-sample2 Passed
bzip2 tests sample3 fixture Original / libbz2 / usage-bzip2-test-sample3 Passed
bzip2 test stream Original / libbz2 / usage-bzip2-test-stream Passed
bzip2 -t rejects a stream with a corrupted internal byte Original / libbz2 / usage-bzip2-test-trailing-junk-byte Passed
Flips an internal byte inside a valid bzip2 compressed stream and verifies bzip2 -t reports an integrity / corruption error rather than silently accepting the tampered file.
bzip2 -tv reports ok on perfect file Original / libbz2 / usage-bzip2-test-verbose-perfect-file Passed
Runs bzip2 -tv against a freshly compressed valid stream and verifies the verbose report names the file and reports ok.
bzip2 test verbose Original / libbz2 / usage-bzip2-test-verbose Passed
bzip2 three concatenated streams Original / libbz2 / usage-bzip2-three-stream-concat Passed
Appends three bzip2 streams into a single file and verifies bzip2 -dc emits all three plaintext payloads in order.
bzip2 round-trip on single-byte input Original / libbz2 / usage-bzip2-tiny-input-roundtrip Passed
bzip2 -t rejects truncated archive Original / libbz2 / usage-bzip2-truncated-archive-rejected Passed
Truncates the trailing bytes of a valid .bz2 stream and verifies bzip2 -t fails with a non-zero exit and an unexpected-end-of-file or integrity diagnostic on stderr.
bzip2 -V emits the canonical version banner format Original / libbz2 / usage-bzip2-uppercase-v-version-format Passed
Runs bzip2 -V and verifies the emitted banner matches the canonical "bzip2, a block-sorting file compressor. Version <X.Y.Z>" format, exposing copyright attribution and the parseable version triple.
bzip2 -V emits a strictly formatted "Version X.Y.Z, dd-Mon-yyyy" line Original / libbz2 / usage-bzip2-v-flag-version-line-format Passed
Runs bzip2 -V, captures the banner from stdout+stderr (the upstream banner historically goes to stderr with exit 1), and verifies a single canonical "Version X.Y.Z, dd-Mon-yyyy" line is present alongside the program name, "block-sorting" wording, copyright, and the Julian Seward attribution.
bzip2 verbose stdin stats Original / libbz2 / usage-bzip2-verbose-stdin-stats Passed
Compresses stdin with bzip2 -v and verifies the verbose stats line reports the stdin label and bits/byte ratio.
bzip2 verbose test file Original / libbz2 / usage-bzip2-verbose-test-file Passed
bzip2 verbose integrity check Original / libbz2 / usage-bzip2-verbose-test Passed
bzip2 version query Original / libbz2 / usage-bzip2-version-query Passed
bzip2 -vv double verbose compress Original / libbz2 / usage-bzip2-vv-double-verbose Passed
Compresses a multi-block payload with bzip2 -vv and verifies the second verbosity level emits per-block CRC accounting alongside the final combined CRC line.
bzip2 stream magic bytes via od Original / libbz2 / usage-bzip2-xxd-magic-bytes Passed
Compresses input with bzip2 -9 and uses od -An -tx1 to verify the first six bytes form the expected BZh9 + pi-block magic (42 5a 68 39 31 41).
bzip2recover pieces concatenate into the original stream Original / libbz2 / usage-bzip2recover-concatenate-pieces Passed
Splits a multi-block stream with bzip2recover, concatenates the rec*.bz2 fragments in lexical order, and verifies bzcat over the concatenation reproduces the original payload exactly.
bzip2recover salvages blocks from corrupted stream Original / libbz2 / usage-bzip2recover-corrupt-pieces Passed
Corrupts a multi-block bzip2 stream and verifies bzip2recover emits per-block rec*.bz2 fragments.
bzip2recover produces exactly the expected number of pieces Original / libbz2 / usage-bzip2recover-exact-piece-count Passed
Compresses a payload large enough to span exactly N bzip2 -1 (100k) blocks, runs bzip2recover, and verifies the produced rec*.bz2 piece count equals N - matching the per-block stderr "block 1 to 1" line count emitted by bzip2recover.
bzip2recover pieces each decompress to a non-empty payload slice Original / libbz2 / usage-bzip2recover-pieces-decompress-individually Passed
Splits a multi-block bzip2 stream with bzip2recover, decompresses each piece on its own, and verifies every slice is non-empty and the concatenation in lexical order equals the original input byte-for-byte.
bzcat decompresses file to stdout Original / libbz2 / usage-bzless-decompresses-file Passed
Decompresses a .bz2 file through bzcat (the pipeline-friendly pager-free counterpart of bzless) and verifies the plaintext lines round-trip on stdout.
bzmore exits cleanly on q Original / libbz2 / usage-bzmore-q-quits-cleanly Passed
Pipes a 'q' keystroke into bzmore over a compressed file and verifies bzmore exits zero without dumping the entire payload to stdout.
bzmore shows first lines Original / libbz2 / usage-bzmore-shows-first-lines Passed
Runs bzmore with cat as the pager on a multi-line compressed file and verifies the first three plaintext lines appear in order at the start of the output.
CVE-2005-1260 libbz2 regression Original / libbz2 / cve-2005-1260 Passed
Asserts that bzip2 makes forward progress on malformed bz2 input and rejects it within a bounded time, instead of spinning in the historical decompression-bomb infinite loop.
CVE-2010-0405 libbz2 regression Original / libbz2 / cve-2010-0405 Passed
Asserts that BZ2_decompress validates internal counts and rejects a corrupted bz2 block instead of letting unchecked arithmetic on attacker-controlled selector counts drive a crash or out-of-bounds access.
libbz2 C API round trip Port / libbz2 / c-api-buffer-roundtrip Passed
bzip2 command round trip Port / libbz2 / cli-compress-decompress Passed
bzip2 corrupted stream rejection Port / libbz2 / corrupted-stream-rejection Passed
Debian sample fixture parity Port / libbz2 / debian-sample-parity Passed
bzip2 stream concatenation Port / libbz2 / stream-concatenation Passed
bunzip2 alias decompress Port / libbz2 / usage-bunzip2-alias Passed
bunzip2 -c reads stdin and writes to stdout Port / libbz2 / usage-bunzip2-c-stdin-roundtrip Passed
Pipes a freshly compressed stream into bunzip2 -c on stdin and verifies stdout reproduces the original bytes exactly.
bunzip2 stdin pipe decompresses to exact bytes Port / libbz2 / usage-bunzip2-explicit-suffix-decompress Passed
Compresses a payload with bzip2 to stdout and verifies bunzip2 reading from stdin restores the original bytes exactly.
bunzip2 force overwrite existing output Port / libbz2 / usage-bunzip2-force-overwrite Passed
Pre-populates the decompressed output path with stale bytes and verifies bunzip2 -f replaces it with the recovered payload while keeping the compressed input via -k.
bunzip2 expands concatenated multi-stream input Port / libbz2 / usage-bunzip2-multistream-concatenation Passed
Concatenates three independently compressed bzip2 streams and verifies bunzip2 reassembles the exact joined payload via stdin.
bunzip2 --keep long flag preserves the .bz2 input after decompression Port / libbz2 / usage-bunzip2-r10-long-keep-flag Passed
Decompresses a .bz2 file with bunzip2 --keep and verifies both the original archive and the decompressed output exist with matching content.
bunzip2 stdin output Port / libbz2 / usage-bunzip2-stdin-output Passed
bunzip2 stdout roundtrip Port / libbz2 / usage-bunzip2-stdout-roundtrip Passed
Decompresses a bzip2 stream to stdout with bunzip2 -c and verifies the restored plaintext payload.
bunzip2 stdout sample1 Port / libbz2 / usage-bunzip2-stdout-sample1 Passed
Decompresses the bundled sample1 fixture to stdout with bunzip2 and verifies byte-for-byte parity with the reference file.
bunzip2 test alias Port / libbz2 / usage-bunzip2-test-alias Passed
bzcat reads compressed data Port / libbz2 / usage-bzcat-alias Passed
bzcat concatenated streams Port / libbz2 / usage-bzcat-concatenated-streams Passed
bzcat /dev/stdin redirected from .bz2 Port / libbz2 / usage-bzcat-dev-stdin-redirect Passed
Feeds a bzip2-compressed file into bzcat by passing /dev/stdin as an explicit argument while redirecting fd 0 from the .bz2 file, and verifies the output matches the original bytes.
bzcat preserves embedded null bytes Port / libbz2 / usage-bzcat-null-bytes-preserved Passed
Compresses a binary payload that contains embedded NUL (0x00) bytes interleaved with ASCII text and verifies bzcat decompression reproduces the bytes exactly, with NULs intact and at the original offsets.
bzcat preserves the exact source line count Port / libbz2 / usage-bzcat-preserves-exact-line-count Passed
Builds a source file with a known number of newline-terminated lines, compresses it with bzip2, and verifies bzcat decompression yields exactly the same line count plus the same final-newline status as the source - guarding against off-by-one or trailing-newline drift in the decompression path.
bzcat sample2 lines Port / libbz2 / usage-bzcat-sample2-lines Passed
Streams the bundled sample2 fixture through bzcat and verifies the decompressed text is nonempty.
bzcat sample three compare Port / libbz2 / usage-bzcat-sample3-compare Passed
bzcat handles file paths containing spaces Port / libbz2 / usage-bzcat-spaces-in-path Passed
Compresses a file located at a path containing space characters in both directory and filename components and verifies bzcat decompresses it correctly when the quoted path is passed as a positional argument.
bzcat stdin input Port / libbz2 / usage-bzcat-stdin-input Passed
Pipes a bzip2 stream into bzcat from stdin and verifies the decompressed payload appears on stdout.
bzcat concatenates three file arguments Port / libbz2 / usage-bzcat-three-files-args Passed
Passes three independently compressed files as positional arguments to bzcat and verifies all three payloads appear in order.
bzcat two files Port / libbz2 / usage-bzcat-two-files Passed
Concatenates two compressed files with bzcat and verifies both decompressed payloads appear in the output.
bzcmp different files Port / libbz2 / usage-bzcmp-different-exit Passed
Compares two different compressed files with bzcmp and verifies the command reports a textual difference.
bzcmp identical archives Port / libbz2 / usage-bzcmp-identical Passed
bzcmp ignore initial bytes Port / libbz2 / usage-bzcmp-ignore-initial-bytes Passed
Builds two compressed payloads that differ only in their first two decompressed bytes and verifies bzcmp --ignore-initial=2 reports them as equal while the unskipped compare exits non-zero.
bzcmp -l lists every differing byte Port / libbz2 / usage-bzcmp-l-listing Passed
Compresses two same-length payloads with several known differing byte positions and verifies bzcmp -l prints one line per differing byte at the expected 1-indexed offsets, with the differing byte values rendered in octal.
bzcmp -s suppresses output and reports via exit code Port / libbz2 / usage-bzcmp-silent-flag Passed
Runs bzcmp -s on identical and differing compressed inputs and verifies stdout/stderr stay empty while the exit code carries the result.
bzcmp -i skips a leading byte run Port / libbz2 / usage-bzcmp-skip-prefix-bytes Passed
Builds a payload whose compressed copy differs from the same payload prepended with a fixed prefix, and verifies bzcmp -i N on the matching prefix length reports the streams as equal.
bzcmp pinpoints differing byte across compressed pair Port / libbz2 / usage-bzcmp-trailing-byte-difference Passed
Builds two .bz2 inputs whose decompressed payloads differ by one byte and verifies bzcmp reports a non-zero exit with the differing offset.
bzdiff -q reports differing files briefly Port / libbz2 / usage-bzdiff-brief-q-flag Passed
Runs bzdiff -q (brief mode) on identical and differing compressed inputs and verifies the report mentions the differing files without emitting full diff hunks.
bzdiff different files Port / libbz2 / usage-bzdiff-different-exit Passed
Diffs two different compressed files with bzdiff and verifies the command reports a textual difference.
bzdiff reports zero diff across all bzip2 levels Port / libbz2 / usage-bzdiff-identical-different-levels Passed
Compresses identical content at every bzip2 level from -1 through -9, then runs bzdiff between the level-1 archive and each other level, verifying every comparison reports no payload difference.
bzdiff compares matching streams Port / libbz2 / usage-bzdiff-identical Passed
bzdiff treats different-level encodings as identical Port / libbz2 / usage-bzdiff-levels-same-content Passed
Compresses identical content at -1 and -9 and verifies bzdiff reports no payload differences across the two encodings.
bzdiff one-arg compares file.bz2 against on-disk file Port / libbz2 / usage-bzdiff-one-arg-vs-disk Passed
Exercises bzdiff's documented single-argument mode where bzdiff file.bz2 decompresses file.bz2 and diffs it against the sibling uncompressed file on disk, covering both the matching and modified-on-disk cases.
bzdiff changed-line output Port / libbz2 / usage-bzdiff-space-filenames Passed
bzdiff diffs two plain (non-bzip2) regular files via diff fallback Port / libbz2 / usage-bzdiff-two-non-bzip2-regular-files Passed
Invokes bzdiff with two regular text files (no .bz2 extension or magic) and verifies bzdiff still reports the textual difference - bzdiff falls back to diff when its arguments are not bzip2 streams. Confirms the "<" and ">" diff markers, and that two identical plain files report no difference.
bzgrep POSIX BRE bracket class Port / libbz2 / usage-bzgrep-bre-bracket-class Passed
Searches a compressed file with a default POSIX BRE pattern using a bracket class and verifies only matching lines are emitted.
bzgrep -c reports per-file match counts Port / libbz2 / usage-bzgrep-c-counts-per-file Passed
Searches three compressed files with bzgrep -c and verifies the emitted output is a "filename:count" line per input, with the per-file counts matching the constructed match distribution (3, 0, 5).
bzgrep count lines Port / libbz2 / usage-bzgrep-count-lines Passed
bzgrep -c counts matches across multiple compressed files Port / libbz2 / usage-bzgrep-count-matches-multiple Passed
Searches two compressed inputs with bzgrep -c and verifies the per-file match counts are emitted accurately.
bzgrep count matches Port / libbz2 / usage-bzgrep-count Passed
bzgrep -E alternation matches either pattern Port / libbz2 / usage-bzgrep-e-multiple-patterns Passed
Uses bzgrep -E with a regex alternation over a compressed file and verifies lines matching either pattern are emitted in original order regardless of alternation argument order.
bzgrep extended regexp alternation Port / libbz2 / usage-bzgrep-extended-regexp Passed
Searches a compressed text stream with bzgrep -E and verifies both alternation branches produce matching lines.
bzgrep spaced filename search Port / libbz2 / usage-bzgrep-filename-space Passed
bzgrep -L lists files without a match Port / libbz2 / usage-bzgrep-files-without-match Passed
Searches several .bz2 inputs with bzgrep -L and verifies only the file lacking the pattern is printed, while files containing the pattern are omitted.
bzgrep fixed string Port / libbz2 / usage-bzgrep-fixed-string Passed
Searches compressed text with bzgrep fixed-string mode and verifies the matching line is returned.
bzgrep -h suppresses the per-line filename prefix across multiple inputs Port / libbz2 / usage-bzgrep-h-suppress-filename-prefix Passed
Searches two compressed files at once with bzgrep -h and verifies that, unlike the default multi-file mode, no "filename:" prefix is attached to each match line. The raw matched lines must appear exactly as in the source.
bzgrep ignore case search Port / libbz2 / usage-bzgrep-ignore-case Passed
bzgrep invert match Port / libbz2 / usage-bzgrep-invert-match Passed
Uses bzgrep -v on a compressed text stream and verifies non-matching lines appear while the excluded line is omitted.
bzgrep line number output Port / libbz2 / usage-bzgrep-line-number Passed
bzgrep list matching file Port / libbz2 / usage-bzgrep-list-matching-file Passed
Searches compressed text with bzgrep -l and verifies the matching compressed filename is emitted.
bzgrep -m 2 caps match count at two Port / libbz2 / usage-bzgrep-max-count-limits-matches Passed
Searches a compressed file containing five matching lines with bzgrep -m 2 and verifies only the first two matches are emitted.
bzgrep prefixes matches with filename across multiple compressed inputs Port / libbz2 / usage-bzgrep-multiple-files-prefix Passed
Searches three compressed files at once with bzgrep and verifies each emitted match is prefixed with the originating filename, and that a non-matching file is silently skipped.
bzgrep -l accepts --null and lists matching filenames Port / libbz2 / usage-bzgrep-null-terminated-filenames Passed
Runs bzgrep -l --null over two compressed files where only one matches and verifies the wrapper accepts the --null flag, lists exactly the matching filename, and skips the non-matching file. (Ubuntu's bzgrep prints filenames itself in -l mode, so the NUL request from --null is absorbed by the wrapper rather than reaching grep.)
bzgrep only matching Port / libbz2 / usage-bzgrep-only-matching Passed
bzgrep -E enables extended regex alternation Port / libbz2 / usage-bzgrep-r11-extended-regex-flag Passed
Compresses a payload with three distinct lines and verifies bzgrep -E '(apple|cherry)' selects exactly the two lines matching either alternative while skipping the unrelated line, exercising the extended-regex alternation operator that BRE would treat as literal characters.
bzgrep -l prints filenames of matching archives only Port / libbz2 / usage-bzgrep-r11-files-with-matches-flag Passed
Builds two .bz2 archives where only one contains the search pattern and verifies bzgrep -l prints just the matching archive's filename, omits the non-matching archive, and writes no per-line content to stdout (bzgrep returns nonzero when at least one input has no matches, so the exit status is captured rather than checked by set -e).
bzgrep -x matches whole lines only, not partial occurrences Port / libbz2 / usage-bzgrep-r11-line-match Passed
Compresses a payload containing the literal "exact" on a line by itself and the substring "exactly" on another line, then verifies bzgrep -x 'exact' returns only the standalone-line match and excludes the partial-line occurrence.
bzgrep -w matches whole words and rejects substrings Port / libbz2 / usage-bzgrep-r11-word-match Passed
Compresses a payload containing the substrings "cat" and "category" and verifies bzgrep -w 'cat' prints only the line where "cat" appears as a whole word, with the word-boundary substring match excluded from the output.
bzgrep searches compressed data Port / libbz2 / usage-bzgrep-search Passed
bzgrep -w matches whole words and rejects substrings Port / libbz2 / usage-bzgrep-w-whole-word-only Passed
Searches a compressed file containing both "cat" as a standalone word and "cat" inside larger words (catalog, scatter, concatenate) using bzgrep -w, and verifies only the whole-word lines are emitted while substring lines are excluded.
bzgrep word regexp Port / libbz2 / usage-bzgrep-word-regexp Passed
bzcat numbered pipe Port / libbz2 / usage-bzip2-batch11-bzcat-numbered-pipe Passed
bzgrep after context Port / libbz2 / usage-bzip2-batch11-bzgrep-after-context Passed
bzgrep before context Port / libbz2 / usage-bzip2-batch11-bzgrep-before-context Passed
bzgrep fixed brackets Port / libbz2 / usage-bzip2-batch11-bzgrep-fixed-brackets Passed
bzgrep no filename Port / libbz2 / usage-bzip2-batch11-bzgrep-no-filename Passed
bzgrep nonmatching file Port / libbz2 / usage-bzip2-batch11-bzgrep-nonmatching-file Passed
Searches compressed files with bzgrep -L and verifies the nonmatching compressed filename is emitted.
bzgrep quiet match Port / libbz2 / usage-bzip2-batch11-bzgrep-quiet-match Passed
bzmore pager cat Port / libbz2 / usage-bzip2-batch11-bzmore-pager-cat Passed
Reads a compressed file through bzmore with cat as the pager and verifies the decompressed text.
bzip2 compress c flag Port / libbz2 / usage-bzip2-batch11-compress-c-flag Passed
bzip2 decompress c flag Port / libbz2 / usage-bzip2-batch11-decompress-c-flag Passed
bzcat on a non-bzip2 file exits nonzero Port / libbz2 / usage-bzip2-batch12-bzcat-mixed-with-uncompressed-fails Passed
Runs bzcat against a plain text file that is not bzip2 compressed and verifies it exits with a non-zero status.
bzdiff between two compressed copies of the same content yields no differences Port / libbz2 / usage-bzip2-batch12-bzdiff-three-way-equal Passed
Compresses identical content into two separate .bz2 files (different filenames) and verifies bzdiff exits zero with no output (no differences).
bzgrep -F treats pattern as fixed string with regex metacharacters Port / libbz2 / usage-bzip2-batch12-bzgrep-fixed-string-matches-only Passed
Compresses a file containing both a literal "a.b" and a string matching the regex a.b (ax3b), then verifies bzgrep -F "a.b" matches only the literal line.
bzip2 roundtrip preserves all 256 byte values Port / libbz2 / usage-bzip2-batch12-decompress-binary-256-bytes Passed
Compresses a 256-byte payload containing all byte values 0x00..0xff with bzip2 and verifies decompression returns the exact same bytes.
bzip2 -d on empty stdin exits nonzero Port / libbz2 / usage-bzip2-batch12-decompress-empty-stdin-rejects Passed
Pipes zero bytes (empty file) into "bzip2 -d" and verifies bzip2 reports a non-zero exit code (a 0-byte stream is not a valid bzip2 archive).
bzip2 -d concatenated three streams produces concatenated payload Port / libbz2 / usage-bzip2-batch12-decompress-multistream-three-streams Passed
Compresses three different payloads, concatenates the three .bz2 streams into a single file, and verifies bzip2 -d returns the concatenated original payloads.
bzip2 -dc concatenates multiple bz2 files in argument order Port / libbz2 / usage-bzip2-batch12-multi-file-stdout-concat Passed
Compresses three text files separately, then runs bzip2 -dc with all three as arguments and verifies the concatenated output equals the original three files concatenated.
bzip2recover on a multi-block archive yields rec*.bz2 files Port / libbz2 / usage-bzip2-batch12-recover-yields-block-files Passed
Compresses 1MB of pseudo-random data with -9 (multiple blocks), runs bzip2recover, and verifies at least one rec*.bz2 piece file is produced and each is itself a valid bz2 stream.
bzip2 -c reads stdin and writes compressed stream to stdout via temp files Port / libbz2 / usage-bzip2-batch12-stdin-c-flag-stdout-pipeline Passed
Pipes input into bzip2 -c using temp files (no shell pipe to avoid SIGPIPE), then decompresses with bunzip2 -c and verifies the roundtripped bytes match.
bzip2 -t rejects an archive with a flipped data byte Port / libbz2 / usage-bzip2-batch12-test-corrupt-byte-flips-fail Passed
Compresses a payload, flips a single byte deep inside the archive, and verifies bzip2 -t exits nonzero (reports corruption).
bzip2 best compression file Port / libbz2 / usage-bzip2-best-compress-file Passed
Compresses a file at the highest bzip2 block setting and verifies decompression restores the original payload.
bzip2 best compress roundtrip Port / libbz2 / usage-bzip2-best-compress-roundtrip Passed
Compresses a file with bzip2 -9, decompresses it again, and verifies the restored plaintext payload.
bzip2 best stdout stream Port / libbz2 / usage-bzip2-best-stdout Passed
bzip2 block size six roundtrip Port / libbz2 / usage-bzip2-block-six-roundtrip Passed
Compresses a multi-line payload with bzip2 -6, decompresses it through bzip2 -dc, and verifies byte-for-byte equality with the source.
bzip2 compress file Port / libbz2 / usage-bzip2-compress-file Passed
bzip2 concatenated streams Port / libbz2 / usage-bzip2-concatenated-streams Passed
bzip2 round-trips a file with long runs of consecutive NUL bytes Port / libbz2 / usage-bzip2-consecutive-nul-bytes-roundtrip Passed
Builds a payload dominated by long runs of consecutive NUL (0x00) bytes interleaved with short ASCII markers, compresses with bzip2, decompresses it back, and verifies every NUL is preserved at the same offset and count.
bzip2 rejects corrupt stream Port / libbz2 / usage-bzip2-corrupt-rejection Passed
bzip2 custom suffix round trip Port / libbz2 / usage-bzip2-custom-suffix-roundtrip Passed
bzip2 -d strips the .bz suffix Port / libbz2 / usage-bzip2-decompress-bz-suffix Passed
Verifies that bzip2 -d recognises the legacy .bz extension and decompresses payload.bz to a suffix-less payload file with the original bytes.
bzip2 decompress keep input Port / libbz2 / usage-bzip2-decompress-keep-input Passed
bunzip2 -k preserves archive Port / libbz2 / usage-bzip2-decompress-keep-leaves-archive Passed
Runs bunzip2 -k on a .bz2 file and verifies both the original archive and the newly written decompressed file are present and that the decoded content matches the pre-compression bytes.
bzip2 --decompress is the long-form alias for -d Port / libbz2 / usage-bzip2-decompress-long-flag Passed
Round-trips a payload by compressing with bzip2 -c and then decompressing with bzip2 --decompress -c, confirming the long --decompress flag behaves identically to the short -d alias on both file-arg and stdin variants.
bzip2 -d missing file fails Port / libbz2 / usage-bzip2-decompress-missing-file-exit Passed
Asks bzip2 -d to decompress a path that does not exist and confirms it exits non-zero with an error written to stderr.
bzip2 quiet decompress stdin Port / libbz2 / usage-bzip2-decompress-quiet-stdin Passed
Decompresses a bzip2 stream from stdin with bzip2 -dcq and verifies the restored payload is written to stdout.
bzip2 decompress replaces compressed file Port / libbz2 / usage-bzip2-decompress-replace-input Passed
Compresses a file with bzip2, decompresses it with bzip2 -d, and verifies the .bz2 file is removed and the plaintext restored.
bunzip2 strips suffix Port / libbz2 / usage-bzip2-decompress-suffix Passed
bzip2 round-trips arbitrary binary with embedded newlines Port / libbz2 / usage-bzip2-embedded-newlines-binary-roundtrip Passed
Builds a payload mixing newline bytes, NUL bytes, and the full 0..255 byte range, round-trips it through bzip2/bunzip2, and verifies sha256 matches.
bzip2 empty file roundtrip Port / libbz2 / usage-bzip2-empty-file-roundtrip Passed
Compresses and decompresses an empty file with bzip2 and verifies that the restored output remains empty.
bzip2 empty file round trip Port / libbz2 / usage-bzip2-empty-file Passed
bzip2 empty stdout stream Port / libbz2 / usage-bzip2-empty-stdout Passed
Compresses and decompresses an empty file through stdout and verifies the reconstructed output is still empty.
bzip2 explicit /dev/stdin path Port / libbz2 / usage-bzip2-explicit-dev-stdin Passed
Decompresses a bzip2 stream by passing /dev/stdin as the explicit input path and verifies the recovered plaintext matches the original.
bzip2 -2 -5 -8 set the block-size header byte Port / libbz2 / usage-bzip2-explicit-levels-block-byte Passed
Compresses the same payload at three explicit non-extreme levels and verifies the fourth header byte encodes the requested level.
bzip2 fast compression file Port / libbz2 / usage-bzip2-fast-compress-file Passed
Compresses a file at the fastest bzip2 block setting and verifies decompression restores the original payload.
bzip2 fast compress roundtrip Port / libbz2 / usage-bzip2-fast-compress-roundtrip Passed
Compresses a file with bzip2 -1, decompresses it again, and verifies the restored plaintext payload.
bzip2 fast stdout stream Port / libbz2 / usage-bzip2-fast-stdout Passed
bzip2 -1 and -9 produce distinct compressed sizes Port / libbz2 / usage-bzip2-fast-vs-best-size-differs Passed
Compresses a highly compressible payload at -1 and -9 and verifies the two outputs differ in size while round-tripping to identical bytes.
bzip2 force decompress over existing file Port / libbz2 / usage-bzip2-force-decompress-suffix Passed
Uses bzip2 -df to overwrite a pre-existing file when decompressing a .bz2 archive and verifies the restored content.
bzip2 force overwrite Port / libbz2 / usage-bzip2-force-overwrite Passed
bzip2 --help advertises core options Port / libbz2 / usage-bzip2-help-output Passed
Runs bzip2 --help and verifies the help banner mentions the version, the -d/-z compression toggles, and the block-size flag, then runs bzip2 -h and confirms the same banner is produced.
bzip2 -1 strictly larger than -9 on repeating text Port / libbz2 / usage-bzip2-highly-compressible-size-strictly-decreasing Passed
Compresses a deeply repetitive text payload at -1 and -9 and verifies the -9 output is strictly smaller than -1, with both rounds-tripping to identical original bytes via libbz2.
bzip2 -1 and -9 produce near-equal sizes on random data Port / libbz2 / usage-bzip2-incompressible-random-levels Passed
Compresses an incompressible random binary payload at -1 and -9 and verifies both streams round-trip and end up within a small relative size of each other (incompressible input cannot be meaningfully shrunk by any block size).
bzip2 keep input on compress Port / libbz2 / usage-bzip2-keep-input-compress Passed
bzip2 keep multi-file compress Port / libbz2 / usage-bzip2-keep-multi-file-compress Passed
Compresses two files with bzip2 -k and verifies the originals and compressed outputs both remain present.
bzip2 -k preserves original bytes alongside .bz2 Port / libbz2 / usage-bzip2-keep-preserves-original-bytes Passed
Compresses a file with bzip2 -k and verifies the original is preserved byte-for-byte while a non-empty valid .bz2 is produced.
bzip2 large block Port / libbz2 / usage-bzip2-large-block Passed
bzip2 -2 roundtrip integrity Port / libbz2 / usage-bzip2-level-2-roundtrip-integrity Passed
Compresses a 200KB structured payload at block level 2 and verifies bzip2 -t accepts it and bunzip2 -c reproduces the bytes exactly.
bzip2 -7 roundtrip integrity Port / libbz2 / usage-bzip2-level-7-roundtrip-integrity Passed
Compresses a deterministic payload at block level 7 and verifies bzip2 -t accepts the file and the round-tripped bytes match the original.
bzip2 levels 1 and 9 round-trip identically Port / libbz2 / usage-bzip2-level-size-monotonic Passed
Compresses the same payload at -1 and -9 and verifies both decompress to identical bytes via libbz2.
bzip2 -1 and -9 round-trip a 1MB pseudo-random file Port / libbz2 / usage-bzip2-levels-1-and-9-roundtrip-1mb Passed
Generates a deterministic 1MB pseudo-random payload, compresses it with bzip2 -1 and bzip2 -9 separately, decompresses both, and verifies the SHA-256 of each restored byte stream matches the original.
bzip2 license flag Port / libbz2 / usage-bzip2-license-flag Passed
bzip2 emits BZh magic header Port / libbz2 / usage-bzip2-magic-bytes-header Passed
Compresses a payload and verifies the produced .bz2 stream begins with the bzip2 BZh magic bytes.
bzip2 medium block stdout Port / libbz2 / usage-bzip2-medium-stdout Passed
bzip2 multi-file compress Port / libbz2 / usage-bzip2-multi-file-compress Passed
bzip2 multi-file decompress Port / libbz2 / usage-bzip2-multi-file-decompress Passed
bzip2 -t accepts mixed-level archives Port / libbz2 / usage-bzip2-multi-file-mixed-levels-test Passed
Compresses three distinct payloads at block levels 1, 5, and 9 and verifies a single bzip2 -t invocation accepts all three resulting archives.
bzip2 -q suppresses unrecognised-suffix warnings Port / libbz2 / usage-bzip2-q-suppresses-suffix-warning Passed
Decompresses a bzip2 stream stored under a non-canonical suffix and verifies that bzip2 normally warns "Can't guess original name" on stderr but produces no such warning when -q is supplied, while still producing the correct decompressed output.
bzip2 quiet no stderr Port / libbz2 / usage-bzip2-quiet-no-stderr Passed
Runs bzip2 --quiet on a successful compress+test cycle and verifies the command emits no diagnostics on stderr while still producing a valid compressed stream.
bzip2 --best long alias produces the same output as -9 Port / libbz2 / usage-bzip2-r10-best-alias-equals-level-9 Passed
Compresses identical content with --best and with -9 to separate files and verifies the resulting .bz2 streams are byte-identical, confirming --best is exactly an alias for -9.
bzip2 --compress long flag is byte-equal to -z short flag Port / libbz2 / usage-bzip2-r10-long-compress-flag Passed
Compresses identical input twice via stdin, once with --compress and once with the short -z form, and verifies both .bz2 outputs are byte-identical to confirm the long-flag alias maps to the same operation.
bzip2 --force long flag overwrites an existing .bz2 target Port / libbz2 / usage-bzip2-r10-long-force-overwrite Passed
Pre-creates a placeholder .bz2 file and then runs bzip2 --force, verifying the placeholder is replaced with a valid compressed stream of the source.
bzip2 --keep long flag preserves the source file Port / libbz2 / usage-bzip2-r10-long-keep-flag Passed
Compresses a file using the --keep long-form flag and verifies both the original and the .bz2 output remain on disk.
bzip2 --quiet long flag suppresses noncritical messages Port / libbz2 / usage-bzip2-r10-long-quiet-no-banner Passed
Compresses content with --quiet and verifies stderr is empty while the compressed file is still produced and round-trips cleanly.
bzip2 --stdout long flag writes compressed bytes to stdout Port / libbz2 / usage-bzip2-r10-long-stdout-flag Passed
Uses bzip2 --stdout to emit a compressed stream to a captured file, leaving the input untouched, and verifies the captured stream round-trips to the original payload.
bzip2 --verbose long flag prints a ratio summary line on compress Port / libbz2 / usage-bzip2-r10-long-verbose-ratio-line Passed
Compresses a file with the --verbose long-form flag and verifies the per-file summary line on stderr contains the expected ratio, bits/byte, percent-saved and in/out byte fields.
bzip2 -d on a .tbz file strips the suffix to .tar Port / libbz2 / usage-bzip2-r10-tbz-suffix-decompress Passed
Renames a valid bz2-compressed file to use the .tbz suffix and verifies bzip2 -d strips the suffix to produce a .tar named output, matching the documented suffix table.
bzip2 -d on a .tbz2 file strips the suffix to .tar Port / libbz2 / usage-bzip2-r10-tbz2-suffix-decompress Passed
Renames a valid bz2-compressed file to use the .tbz2 suffix and verifies bzip2 -d strips the suffix to produce a .tar named output, matching the documented suffix table.
bzip2 -c1 combines stdout and level-1 in one short flag bundle Port / libbz2 / usage-bzip2-r11-combined-c-and-level Passed
Compresses to stdout with the bundled short flags -c1 (write to stdout, level 1) and confirms the captured stream decompresses byte-for-byte while leaving the input file untouched (no .bz2 sibling created).
bzip2 -dvc combined decompress, verbose, and stdout short flags Port / libbz2 / usage-bzip2-r11-combined-dvc-flags Passed
Decompresses a .bz2 to stdout with the bundled short flags -dvc and confirms the original bytes are emitted on stdout while the verbose summary line is written on stderr; the input .bz2 must remain on disk because -c suppresses removal.
bzip2 -kfv combined short flags keep, force, and trace verbosely Port / libbz2 / usage-bzip2-r11-combined-kfv-flags Passed
Pre-creates the .bz2 target then runs bzip2 -kfv with combined short flags and confirms the original input is retained, the existing target is overwritten, and the verbose ratio line is emitted on stderr.
bzip2 -- terminator allows compressing a dash-prefixed filename Port / libbz2 / usage-bzip2-r11-end-of-options-separator Passed
Creates a file whose name begins with a dash and uses the -- end-of-options separator so bzip2 treats the dash-prefixed token as a filename rather than a flag, then verifies the .bz2 sibling exists and decodes to the original content.
bzip2 --small long-form roundtrips a file Port / libbz2 / usage-bzip2-r11-small-long-flag Passed
Compresses a file with the --small long flag (memory-conservative decompressor mode flag) and verifies the .bz2 output decompresses back to the original payload byte-for-byte.
bzip2 --test long flag verifies a valid stream Port / libbz2 / usage-bzip2-r11-test-long-flag Passed
Compresses a payload, runs bzip2 --test on the resulting .bz2 file, and asserts the integrity check exits zero with no stdout output (long-form for -t).
bzcat reads .bz2 stream from stdin via shell redirection Port / libbz2 / usage-bzip2-r12-bzcat-stdin-redirect Passed
Compresses a payload, then runs bzcat with no arguments and stdin redirected from the .bz2 file (< file), and verifies the decoded stdout matches the original payload byte-for-byte.
bzdiff -q on two equal .bz2 archives is silent and exits zero Port / libbz2 / usage-bzip2-r12-bzdiff-q-quiet-equal Passed
Compresses identical content into two .bz2 files and runs "bzdiff -q" on the pair, asserting exit zero and no output on stdout or stderr (quiet mode for matching files).
bzgrep -h suppresses filename prefix across two .bz2 archives Port / libbz2 / usage-bzip2-r12-bzgrep-h-no-prefix Passed
Builds two .bz2 archives both containing a matching line and verifies that "bzgrep -h pattern file1.bz2 file2.bz2" emits the matched lines without the filename prefix that bzgrep would otherwise prepend in multi-file mode.
bzip2 --decompress --stdout long-form decompresses to stdout without consuming input Port / libbz2 / usage-bzip2-r12-decompress-stdout-flag Passed
Compresses a file with --keep, then decompresses it via "bzip2 --decompress --stdout" long-form flags and confirms the decoded bytes match the original while the source .bz2 file remains on disk untouched.
bzip2 --fast long alias produces same output as -1 Port / libbz2 / usage-bzip2-r12-fast-long-flag Passed
Compresses identical content with --fast and with -1 to separate streams via -c and confirms the resulting bytes are identical, exercising the documented --fast=-1 long alias.
bzip2 -k roundtrip preserves a 1MiB payload exactly Port / libbz2 / usage-bzip2-r12-keep-roundtrip-1mb Passed
Builds a deterministic 1 MiB payload, compresses with bzip2 -k (keep input), then decompresses the .bz2 to a fresh location with bzip2 -dc and asserts byte-equal sha256 against the original.
bzip2 -t with three valid bz2 files exits zero Port / libbz2 / usage-bzip2-r12-multi-file-test-all-pass Passed
Compresses three separate inputs into three .bz2 files and runs "bzip2 -t" on all three in one invocation, asserting exit zero and no stdout output.
bzip2 -dc on stdin decodes two concatenated streams in order Port / libbz2 / usage-bzip2-r12-stdin-multiple-streams-decode Passed
Concatenates two independently-compressed .bz2 streams and pipes the result into "bzip2 -dc" via stdin, asserting the decoded output equals the in-order concatenation of both source payloads.
bzip2 -t on a corrupted stream from stdin exits nonzero Port / libbz2 / usage-bzip2-r12-stdin-test-corrupt-fails Passed
Compresses a payload, flips a byte deep in the data block (offset 30) to corrupt it, and runs "bzip2 -t" with stdin redirected from the damaged file. The integrity check must exit nonzero.
bzip2 -c | bunzip2 -c pipeline preserves bytes exactly Port / libbz2 / usage-bzip2-r12-stdout-pipeline-roundtrip Passed
Pipes the input through bzip2 -c into bunzip2 -c in a single shell pipeline and verifies the round-trip output matches the source bytes via sha256, with no on-disk artifacts beyond the input.
bzcat reads concatenated bz2 streams from stdin Port / libbz2 / usage-bzip2-r13-bzcat-stdin-concatenated-streams Passed
Concatenates two distinct .bz2 streams and pipes the result into bzcat via stdin, then asserts the decoded stdout equals the in-order concatenation of both source payloads.
bzcat reads three concatenated bz2 streams from stdin Port / libbz2 / usage-bzip2-r13-bzcat-three-streams-stdin Passed
Builds a single concatenated .bz2 file from three independent compress invocations and decodes it through "bzcat" stdin redirection, asserting the decoded bytes are the in-order concatenation of all three sources.
bzdiff on two byte-identical bz2 files exits zero with no diff output Port / libbz2 / usage-bzip2-r13-bzdiff-equal-files-exit-zero Passed
Compresses the same payload twice into separate .bz2 files (decompressed contents are identical), runs bzdiff on the pair, and asserts exit zero plus an empty stdout (no diff output).
bzgrep -c reports a per-file matching line count Port / libbz2 / usage-bzip2-r13-bzgrep-c-count-flag Passed
Builds a .bz2 file with a known number of lines containing the pattern and runs "bzgrep -c PATTERN file.bz2", asserting the printed integer equals the expected match count.
bzgrep -c reports per-file match counts across two .bz2 files Port / libbz2 / usage-bzip2-r13-bzgrep-l-list-matching-files Passed
Creates two .bz2 files where exactly one contains the pattern and runs "bzgrep -c", asserting the matching file reports a positive count and the non-matching file reports 0. (Noble's bzgrep wrapper does not surface per-file names when run with -l on multiple inputs because it pipes through stdin; -c is the documented per-file aggregate that does work.)
bzip2recover pieces concatenated decode covers part of original payload Port / libbz2 / usage-bzip2-r13-bzip2recover-pieces-cover-payload Passed
Compresses a deterministic ~1 MiB input at -9 (multiple blocks), runs bzip2recover, then concatenates the recovered rec*.bz2 pieces into one stream, decodes that with bzcat, and asserts the recovered output is non-empty and starts with bytes that appear in the original input — confirming the recovery pipeline produces real decodable content.
bzmore prints decoded bz2 content when piped to a non-tty Port / libbz2 / usage-bzip2-r13-bzmore-pipe-decode Passed
Compresses a known payload and pipes "bzmore" output through cat (so bzmore is not attached to a tty) and asserts the visible content includes the source line.
bzip2 -kc emits stdout and leaves the input file untouched Port / libbz2 / usage-bzip2-r13-keep-stdout-leaves-input Passed
Runs "bzip2 -kc input" to write the compressed stream to stdout while keeping the input, asserts no input.bz2 sibling is created, the source file is byte-identical to its pre-run sha256, and the stdout stream is a valid bz2 file by header magic and "bzip2 -t".
bzip2 -1 produces a no-smaller archive than -9 on 1MB compressible input Port / libbz2 / usage-bzip2-r13-level-size-monotonic-1mb Passed
Compresses a 1 MiB highly-repetitive payload at levels -1 and -9 separately and asserts the level-9 output is no larger than the level-1 output (typically strictly smaller for compressible content), capturing the documented level-vs-size relationship.
bzip2 -s small-memory decompress roundtrips a payload Port / libbz2 / usage-bzip2-r13-small-mode-roundtrip Passed
Compresses a payload with default settings, then decodes it with "bzip2 -s -dc" (small-memory mode) and verifies the decoded stdout matches the source byte-for-byte via sha256.
bzcat decodes a stream coming through bash process substitution Port / libbz2 / usage-bzip2-r14-bzcat-process-substitution-roundtrip Passed
Pipes "bzip2 -c" output through bash process substitution into bzcat (bzcat <(bzip2 -c file)) and asserts the decoded stdout matches the source payload sha256, exercising bzcat reading from a process-substitution fifo file argument.
bzdiff on differing .bz2 archives exits 1 and emits diff output Port / libbz2 / usage-bzip2-r14-bzdiff-different-exits-one Passed
Compresses two distinct payloads, runs bzdiff on the resulting .bz2 pair, and asserts the command exits 1 (the diff exit code for differences) with non-empty stdout, complementing the equal-files exit-zero r13 case.
bzgrep -c reports per-file counts across two .bz2 archives Port / libbz2 / usage-bzip2-r14-bzgrep-c-multi-file-counts Passed
Builds two .bz2 archives with different match counts for the same pattern, runs "bzgrep -c PATTERN file1.bz2 file2.bz2", and asserts the output has two lines each prefixed with the input filename and trailing colon-separated count, exercising bzgrep's multi-file -c reporting.
bzgrep -E extended regex with alternation matches expected lines Port / libbz2 / usage-bzip2-r14-bzgrep-extended-regex Passed
Builds a .bz2 archive containing several lines and runs "bzgrep -Ec 'apple|cherry'" asserting exactly two lines match (alternation operator works only under -E), exercising the extended-regex flag forwarded through bzgrep.
bzgrep -i matches case-insensitively across mixed-case lines Port / libbz2 / usage-bzip2-r14-bzgrep-i-case-insensitive Passed
Builds a .bz2 archive with a payload mixing "Apple", "APPLE", and "apple", runs "bzgrep -ic apple file.bz2" and asserts the count is 3, exercising the case-insensitive match flag.
bzmore output piped through cat preserves payload bytes Port / libbz2 / usage-bzip2-r14-bzmore-through-cat-pipe Passed
Compresses a multi-line payload, runs "bzmore" with stdin tied to /dev/null and stdout piped through cat, asserts the captured output contains every source line marker. Distinct from the r13 bzmore pipe-decode case by validating ALL lines (10) rather than two markers.
bzip2 -d round-trips a zero-byte input back to zero bytes Port / libbz2 / usage-bzip2-r14-decompress-empty-stream-yields-empty Passed
Compresses a zero-byte input file with "bzip2 -c" producing a small but non-empty .bz2 stream (containing the empty-block end marker), then decompresses with "bzip2 -dc" and asserts the recovered output is exactly zero bytes — pinning empty-input round-trip behavior.
bzip2 --help banner contains a "Version 1.0" line Port / libbz2 / usage-bzip2-r14-help-shows-version-line Passed
Runs "bzip2 --help" and asserts stdout/stderr include a "Version 1.0" prefix substring, confirming the help banner identifies the bzip2 1.0.x family on Ubuntu 24.04.
bzip2 -q quiets warnings on a non-canonical-suffix output decode Port / libbz2 / usage-bzip2-r14-quiet-suppresses-warning Passed
Decompresses a .bz2 stream from a file whose extension is not .bz2 (so bzip2 normally complains) using "bzip2 -d -q -c", asserts the command exits zero with empty stderr, and that stdout matches the original payload sha256 — confirming -q silences the suffix-related warning chatter without affecting decode correctness.
bzip2 -t accepts three valid .bz2 files in one invocation Port / libbz2 / usage-bzip2-r14-test-three-files-all-pass Passed
Compresses three distinct payloads, runs "bzip2 -t" with all three .bz2 files supplied as positional arguments in one call, and asserts the command exits zero with empty stdout (test mode produces no output on success).
bzcat decodes eight .bz2 files in one call concatenated to stdout Port / libbz2 / usage-bzip2-r15-bzcat-eight-files-stdout-concat Passed
Compresses eight distinct payloads to .bz2 files, runs "bzcat f1.bz2 ... f8.bz2" with all eight as positional arguments, and asserts the stdout sha256 equals the byte-wise concatenation of the eight original payloads — exercising bzcat's many-file argument path beyond the existing two/three-file cases.
bzcmp on differing .bz2 archives exits 1 and emits a non-empty diff report Port / libbz2 / usage-bzip2-r15-bzcmp-byte-position-output Passed
Compresses two payloads that share a common prefix and diverge at a known byte offset, runs "bzcmp" on the resulting .bz2 pair, and asserts the command exits 1 with non-empty output. (Noble's bzcmp wrapper invokes cmp without a fixed output format — assert exit code + non-empty report rather than the exact "differ: byte N, line M" template.)
bzdiff compares a .bz2 archive against an uncompressed file directly Port / libbz2 / usage-bzip2-r15-bzdiff-mixed-bz2-and-plain-arg Passed
Compresses one payload to .bz2, leaves a second payload uncompressed on disk, runs "bzdiff a.txt.bz2 b.txt" with one compressed and one plain argument, and asserts the command exits 1 with a non-empty diff because the contents differ — confirming bzdiff transparently decodes only the .bz2 side of a mixed-pair invocation.
bzgrep --color=never emits matches without ANSI escape sequences Port / libbz2 / usage-bzip2-r15-bzgrep-color-never-flag Passed
Builds a .bz2 archive containing a payload with one obvious match, runs "bzgrep --color=never apple file.bz2", and asserts the output is non-empty, contains the literal match line, and contains zero ESC (0x1b) bytes — confirming the --color=never flag is forwarded through bzgrep to grep without leaking color escapes.
bzgrep -h with two .bz2 inputs strips the filename prefix from every match line Port / libbz2 / usage-bzip2-r15-bzgrep-h-no-prefix-multifile Passed
Builds two .bz2 archives each containing a matching pattern, runs "bzgrep -h apple file1.bz2 file2.bz2", and asserts the output contains exactly two lines (one per match), neither of which contains a filename prefix or colon — confirming -h suppresses the per-line filename header that bzgrep would otherwise add when given multiple inputs. Distinct from r12-bzgrep-h-no-prefix which uses a single file.
bzgrep -n with two .bz2 files prefixes filename and line number per match Port / libbz2 / usage-bzip2-r15-bzgrep-line-number-multifile Passed
Builds two .bz2 archives each containing the matching pattern at distinct line offsets, runs "bzgrep -n PATTERN file1.bz2 file2.bz2" with both files as positional arguments, and asserts the output contains a "<filename>:<lineno>:" prefix for each file's match — exercising the combined multi-file plus -n reporting (distinct from the single-file -n case).
bzip2 double-encode then double-decode pipeline preserves the source bytes Port / libbz2 / usage-bzip2-r15-bzip2-double-compress-stdout-pipe Passed
Pipes a payload through "bzip2 -c | bzip2 -c" producing a doubly-compressed .bz2.bz2 stream, then reverses the pipe through "bunzip2 -c | bunzip2 -c" and asserts the recovered output matches the source sha256. Also asserts the doubly-compressed blob's first three bytes are still the bzip2 magic "BZh", confirming the outer encoder produced a real bzip2 stream over the inner one.
bzip2 -dq on a .bz2 file with a wrong rename emits a warning that -q would have suppressed Port / libbz2 / usage-bzip2-r15-bzip2-q-suffix-warning-suppressed Passed
Compresses a payload, renames the .bz2 file to an unrecognised .dat suffix, then runs two parallel decode invocations writing to disk (not stdout, where bzip2 omits the suffix warning): one with "bzip2 -d" (no quiet flag) capturing stderr, and one with "bzip2 -d -q" (quiet flag). Asserts the loud invocation prints non-empty stderr (the "Can't guess original name" warning), the quiet invocation prints empty stderr, and both produce decoded outputs whose sha256 matches the original — pinning that -q only changes warning chatter, not decode correctness.
bzip2 stdin compression piped through tee to a file decompresses cleanly Port / libbz2 / usage-bzip2-r15-bzip2-stdin-tee-then-bunzip2 Passed
Pipes a payload through "bzip2 -c", through "tee" (writing the compressed bytes to a sidecar file as well as forwarding them), into "bunzip2 -c" on the other end of the pipe. Asserts both the on-disk tee'd .bz2 and the in-line decoded stdout produce the same byte-equivalent recovered payload sha256 — exercising bzip2 as both ends of a tee'd shell pipeline.
bzip2 -vv reports a numeric bits/byte ratio strictly less than 8 Port / libbz2 / usage-bzip2-r15-bzip2-vv-bits-per-byte-numeric Passed
Compresses a highly redundant 64KiB payload with "bzip2 -vv -c", captures stderr, extracts the numeric bits/byte value from the verbose output, and asserts it is a positive number strictly less than 8 (the upper bound for any valid encoding) and greater than zero — pinning that the ratio reported by -vv is well-formed numeric output, distinct from the existing vv-double-verbose case which only checks the literal "bits/byte" substring is present.
bzcat decodes a bz2 stream from stdin via pipeline Port / libbz2 / usage-bzip2-r16-bzcat-stdin-pipe Passed
Streams a bzip2-compressed payload into bzcat over a pipeline and asserts the decoded stdout matches the original input byte-for-byte, locking in the pure-stdin pipe path without temporary archive files on disk.
bzcat preserves argument order when decoding three separate bz2 files Port / libbz2 / usage-bzip2-r16-bzcat-three-files-concat-order Passed
Compresses three distinct payloads into separate .bz2 files and asserts bzcat decoded in the supplied argument order produces line-for-line the concatenation of the original payloads in that order — exercising bzcat's positional argument semantics with a stable line-based assertion.
bzdiff reports identical content between two bz2 archives of the same payload Port / libbz2 / usage-bzip2-r16-bzdiff-archives-equal Passed
Builds two bz2 archives from byte-identical input and asserts bzdiff exits 0 with no output, locking in the equal-payload path of the bzdiff comparator across distinct archive files.
bzgrep -F finds a fixed string in two of three bz2 files Port / libbz2 / usage-bzip2-r16-bzgrep-multi-file-fixed-string Passed
Compresses three distinct payloads where two contain a needle and one does not, runs bzgrep -F across all three, and asserts the output contains matches from both expected files and never from the negative one — without depending on filename prefixing.
bzip2recover writes rec00001 fragment for a truncated archive Port / libbz2 / usage-bzip2-r16-bzip2recover-truncated-fragment Passed
Compresses a multi-line payload, truncates the resulting .bz2 to half its size, runs bzip2recover, and asserts a rec*0001*.bz2 fragment file is produced in the working directory — locking in bzip2recover's standard fragment naming for partially-readable archives.
bzip2 --help output mentions compression and decompression options Port / libbz2 / usage-bzip2-r16-help-mentions-compression-levels Passed
Runs bzip2 --help and asserts the usage banner mentions both "compress" and "decompress" tokens, locking in the user-facing help text shape without depending on column layout or exact wording.
bzip2 -k keeps the input file alongside the compressed output Port / libbz2 / usage-bzip2-r16-k-flag-keeps-original Passed
Compresses a file with bzip2 -k and asserts both the original input and the .bz2 output exist afterwards, locking in the keep-input flag behavior that distinguishes -k from the default "consume the input" path.
bzip2 -9 compresses a repetitive payload no larger than bzip2 -1 Port / libbz2 / usage-bzip2-r16-level-9-smaller-than-level-1 Passed
Compresses an identical highly-repetitive payload at -1 and -9, then asserts the -9 output size is less than or equal to the -1 output size — covering bzip2's compression-level dial without depending on exact byte counts.
bzip2 -t returns 0 on a valid .bz2 archive Port / libbz2 / usage-bzip2-r16-test-valid-archive Passed
Compresses a payload, then runs bzip2 -t on the resulting archive and asserts the exit code is 0 — locking in the integrity-test path that distinguishes valid archives from truncated or corrupted ones.
bzip2 --version banner mentions program name and version year string Port / libbz2 / usage-bzip2-r16-version-banner-shape Passed
Runs bzip2 --version and asserts the banner names the program and includes a "Copyright" line, locking in the upstream banner shape that the Ubuntu 24.04 bzip2 emits without committing to a specific version number.
bunzip2 decompresses a target referenced by absolute path Port / libbz2 / usage-bzip2-r17-bunzip2-absolute-path-target Passed
Compresses a payload, moves the archive to a deeper subdirectory, then invokes bunzip2 with the absolute path to the archive and asserts the decompressed file appears alongside it stripped of the .bz2 suffix.
bunzip2 -k retains the .bz2 archive alongside the decompressed output Port / libbz2 / usage-bzip2-r17-bunzip2-k-keeps-archive Passed
Compresses a payload then runs bunzip2 -k against the archive and asserts both the decompressed file and the original .bz2 archive exist afterward, locking in the keep-original flag for the decompression direction.
bzcat on a bz2 of an empty file emits zero bytes Port / libbz2 / usage-bzip2-r17-bzcat-empty-archive Passed
Compresses an empty file with bzip2 to produce a non-empty archive, then runs bzcat against it and asserts the stdout contains exactly zero bytes — locking in the empty-payload contract distinct from a truncated archive.
bzdiff reports differences when two archives decompress to different content Port / libbz2 / usage-bzip2-r17-bzdiff-different-archives Passed
Builds two bz2 archives from different payloads and runs bzdiff against them, asserting the exit code is 1 and the stdout mentions "differ" — locking in bzdiff's diff-style behavior for unequal decompressed content.
bzgrep -c reports the integer count of matches inside a bz2 archive Port / libbz2 / usage-bzip2-r17-bzgrep-c-counts-matches Passed
Builds a bz2 archive whose decompressed body contains exactly four "needle" lines among other content, runs bzgrep -c against it, and asserts the lone stdout token is the integer 4 — locking in the -c count-mode output shape.
bzip2recover writes per-block rec*.bz2 fragments for an intact archive Port / libbz2 / usage-bzip2-r17-bzip2recover-valid-archive Passed
Compresses a large payload so the resulting .bz2 contains several blocks, runs bzip2recover against the intact archive (no truncation), and asserts at least one rec*.bz2 fragment is produced — exercising the block-extraction path on a healthy archive rather than a corrupted one.
bzip2 --quiet writes no stderr noise while -v emits progress text Port / libbz2 / usage-bzip2-r17-quiet-suppresses-stderr Passed
Compresses the same payload twice — once with --quiet and once with -v — and asserts the --quiet invocation produces an empty stderr file while the -v invocation produces a non-empty stderr, locking in the verbosity contrast between the two flags.
bzip2 -c stdin pipe roundtrip preserves SHA-256 with no temp file Port / libbz2 / usage-bzip2-r17-stdin-pipe-roundtrip-sha256 Passed
Pipes a payload into bzip2 -c and immediately into bzip2 -dc, capturing the recovered bytes on stdout, and asserts the SHA-256 of the recovered stream equals the SHA-256 of the original input — locking in a purely streaming roundtrip free of intermediate archive files.
bunzip2 preserves the standard 0644 file mode after decompression Port / libbz2 / usage-bzip2-r18-bunzip2-leaves-mode-644 Passed
Creates an input file explicitly chmod 644, compresses it with bzip2, decompresses with bunzip2, and asserts the recovered file has mode 644 — locking in unix mode preservation across the compress/decompress roundtrip on noble.
bzcat reproduces every 0..255 byte value through a stdin pipe Port / libbz2 / usage-bzip2-r18-bzcat-binary-256-bytes-stdout Passed
Builds a 256-byte file containing each octet from 0 to 255 exactly once, compresses it with bzip2 -c through stdin, then decompresses with bzcat on the resulting archive and asserts the recovered bytes are identical (sha256 match) — locking in binary fidelity across the full byte range.
bzcat feeds a bzip2-compressed tar stream into tar -tf for listing Port / libbz2 / usage-bzip2-r18-bzcat-via-tar-stream Passed
Creates three files in a directory, packs them into a tar archive, compresses the tar with bzip2, then pipes bzcat output into tar -tf and asserts each of the three member filenames appears in the listing — exercising the cli stream contract for archive consumers.
bzcmp reports the first differing byte position when comparing two compressed payloads Port / libbz2 / usage-bzip2-r18-bzcmp-skip2-byte Passed
Builds two payloads that differ only at offset 5, compresses both, runs bzcmp on the resulting archives without suppression flags, and asserts the output contains "differ: byte" plus a positive byte offset — locking in the human-readable diff line.
bzgrep -l lists only the archives that contain the pattern Port / libbz2 / usage-bzip2-r18-bzgrep-files-with-match Passed
Compresses two text files where only one contains the search pattern, runs bzgrep -l with both archives, and asserts only the matching archive's path appears on stdout while the non-matching archive does not — locking in the files-with-match flag semantics across multi-file invocation.
bzgrep -v across two archives emits lines that do not match the pattern Port / libbz2 / usage-bzip2-r18-bzgrep-v-invert-multifile Passed
Builds two bz2-compressed files each with both matching and non-matching lines, runs bzgrep -v with a multi-file invocation, and asserts the output omits the matching lines but contains the non-matching ones from both archives — locking in invert-match across multi-archive iteration.
bzip2 -d decompresses an archive in place and removes the .bz2 input Port / libbz2 / usage-bzip2-r18-decompress-uppercase-d-flag Passed
Compresses a small text payload with bzip2, runs bzip2 -d against the archive, and asserts the original filename exists with the original bytes restored while the .bz2 archive is gone — locking in the canonical in-place decompression contract.
bzip2 -1 and bzip2 -9 produce archives where level 9 is no larger than level 1 Port / libbz2 / usage-bzip2-r18-level-1-vs-9-size-ordering Passed
Generates a moderately compressible 64 KiB payload of repeated structured text, compresses two copies at -1 and -9 respectively, and asserts level-9 size is less than or equal to level-1 size — locking in the monotonicity of higher levels never being worse on compressible input.
bzip2 -c and bunzip2 -c chain through a single shell pipeline preserving content Port / libbz2 / usage-bzip2-r18-stdin-stdout-pipe-chain Passed
Generates structured text, pipes it through bzip2 -c into bunzip2 -c, captures the result, and asserts the recovered payload is identical to the original line for line and byte for byte (sha256 match) — locking in the pure-pipe streaming roundtrip without intermediate files.
bzip2 -t on a valid archive exits zero and leaves no payload on stdout Port / libbz2 / usage-bzip2-r18-test-flag-valid-rc-zero Passed
Compresses a small text file to bzip2, runs bzip2 -t against the archive capturing stdout, and asserts the command exits with status zero and writes zero bytes to stdout — locking in the integrity-check command being silent on stdout for healthy archives.
bzcat decompresses a file made from five concatenated bzip2 streams Port / libbz2 / usage-bzip2-r19-bzcat-five-stream-concat Passed
Compresses five distinct text payloads separately, concatenates the five .bz2 outputs into a single archive, decompresses with bzcat, and asserts the recovered output contains each of the five distinct markers in order - locking in multi-stream decompression at a higher stream count than existing tests.
bzcmp reports identical content with exit 0 across two distinct compression levels Port / libbz2 / usage-bzip2-r19-bzcmp-equal-files-rc0 Passed
Compresses the same plain payload twice (level -1 and level -9) into separately-named .bz2 archives, runs bzcmp on the pair, and asserts the exit status is 0 with empty stdout - locking in compression-level-agnostic equality on decompressed content.
bzdiff exits 1 and prints a unified diff when archive contents differ Port / libbz2 / usage-bzip2-r19-bzdiff-rc1-content-differs Passed
Compresses two text files differing in a single line, runs bzdiff capturing both rc and stdout, and asserts the exit code is 1 with stdout containing the differing tokens prefixed by "<" and ">" - locking in bzdiff exit semantics and content output for non-equal inputs.
bzgrep with -e and a single-character pattern returns every line containing that char Port / libbz2 / usage-bzip2-r19-bzgrep-empty-pattern-via-e Passed
Compresses a text where two of four lines contain the letter "x", runs bzgrep -e 'x' on the archive, and asserts exactly two matching lines are returned - locking in the -e flag pattern delivery to bzgrep over compressed input.
bzgrep -n prefixes matching lines with the original 1-based line number Port / libbz2 / usage-bzip2-r19-bzgrep-n-line-numbers Passed
Compresses a six-line text where the match falls on line 4, runs bzgrep -n 'target' on the archive, and asserts the captured output begins with "4:" - locking in line-number prefixing of bzgrep over the original (uncompressed) line offsets.
bzgrep -w matches a whole word and skips substring-only occurrences Port / libbz2 / usage-bzip2-r19-bzgrep-w-word-boundary Passed
Compresses a small text file containing the tokens "cat", "catalog", and "scatter" on separate lines with bzip2, runs bzgrep -w 'cat' on the archive, and asserts the output contains the bare-word line but not the substring lines - locking in word-boundary matching on compressed input.
bzip2 -k with stdin input writes to stdout without creating extra files in cwd Port / libbz2 / usage-bzip2-r19-bzip2-stdin-keep-flag-noop Passed
Runs bzip2 -k -c over a stdin redirection in a clean working directory, captures the compressed bytes to a file, and asserts no .bz2 or other artifacts appear in cwd while the captured archive decompresses back to the original payload - locking in stdin-mode neutrality of the -k flag.
bzip2 -t rejects an archive whose final byte has been removed Port / libbz2 / usage-bzip2-r19-bzip2-test-rejects-truncated-tail Passed
Compresses a payload, truncates the archive by one byte from the tail, then runs bzip2 -t on the damaged file and asserts a non-zero exit code with the original (untruncated) archive still passing -t with rc 0 - locking in integrity detection of tail truncation.
bzip2 -d via stdin recovers a payload compressed at block size 1 Port / libbz2 / usage-bzip2-r19-decompress-stdin-block-1 Passed
Compresses a 16 KiB payload of repeating mixed-case text using bzip2 -1 to stdout, pipes the archive into bzip2 -dc, and asserts the recovered bytes are byte-identical (sha256 match) to the source - locking in stdin decompression of small-block archives.
bzip2 round-trips UTF-8 multibyte sequences byte-for-byte Port / libbz2 / usage-bzip2-r19-roundtrip-utf8-multibyte Passed
Writes a text containing multibyte UTF-8 sequences (Greek, CJK, emoji-range BMP), compresses with bzip2 then decompresses to a new file, and asserts the recovered bytes match the source by sha256 - locking in 8-bit-clean handling of multibyte payloads.
bzcat on an archive of an empty file emits zero bytes to stdout Port / libbz2 / usage-bzip2-r20-bzcat-empty-stream-yields-zero-bytes Passed
Compresses a zero-byte file with bzip2, then runs bzcat on the resulting archive and asserts the captured stdout is exactly 0 bytes long via wc -c, exercising the zero-payload case of bzcat distinct from prior empty-archive tests that asserted via diff.
bzcmp returns rc 0 and empty stdout on two archives compressed from the same source Port / libbz2 / usage-bzip2-r20-bzcmp-identical-archives-rc-zero Passed
Writes a source payload, compresses it into two distinct archive files at the same level, then runs bzcmp on the two archives and asserts rc 0 with empty stdout since the underlying decompressed bytes are identical, exercising bzcmp's content-equality semantics on identical compressed inputs distinct from prior different-exit tests.
bzdiff returns rc 0 for two archives with identical payloads compressed at different levels Port / libbz2 / usage-bzip2-r20-bzdiff-three-archives-pairwise-equal Passed
Writes the same source payload, compresses it twice with bzip2 at -3 and at -7 into distinct archive files, then runs bzdiff between the two archives and asserts rc 0 since the decompressed payloads are identical, exercising bzdiff's content-equality semantics across mixed compression levels distinct from prior same-level or three-way tests.
bzgrep with a start-anchor pattern returns only lines beginning with the token Port / libbz2 / usage-bzip2-r20-bzgrep-matches-anchor-start Passed
Compresses a text where two of four lines start with the literal "ERROR " (the rest contain it mid-line or not at all), runs bzgrep '^ERROR ' on the archive, and asserts exactly two matching lines are returned with both starting with "ERROR ", exercising start-of-line anchoring through bzgrep on compressed input distinct from prior fixed-string, word-boundary, or empty-pattern tests.
bzgrep prefixes every match line with the archive filename when given multiple archives Port / libbz2 / usage-bzip2-r20-bzgrep-prints-archive-name-when-multiple-files Passed
Compresses two archives each containing a single line that matches the pattern "needle", runs bzgrep 'needle' against both archive names, and asserts every output line begins with one of the two archive filenames followed by a colon, exercising the default filename-prefix behavior in multi-file mode distinct from prior --no-filename (-h) tests.
bzip2 -dk decompresses while keeping the source archive intact and recovers payload Port / libbz2 / usage-bzip2-r20-bzip2-decompress-keep-archive-with-d-uppercase Passed
Compresses a payload, then runs bzip2 -dk on the archive to decompress while keeping the archive (-k), and asserts both the original archive and the decompressed plain file are present after the operation with the plain file content matching the source - exercising the combination of the keep flag with the lowercase-d decompress flag in a single short-option cluster -dk distinct from the r18 in-place -d test that removes the archive.
bzip2 --help output mentions the --best long option Port / libbz2 / usage-bzip2-r20-bzip2-help-shows-block-size-flag Passed
Runs bzip2 --help and asserts the captured help text contains the literal substring "--best" since the help banner lists long-option aliases for compression-level shortcuts, exercising help-banner content distinct from prior version-line or compression-levels-mention tests.
bzip2 at level -5 compresses and decompresses 1 MiB of structured data losslessly Port / libbz2 / usage-bzip2-r20-bzip2-level-5-roundtrip-1mb Passed
Generates exactly 1 MiB of structured byte-pattern data, compresses it with bzip2 -5 -c, decompresses with bzip2 -dc, and asserts the recovered bytes equal the source via cmp - locking in a mid-range compression-level roundtrip distinct from prior tests that focus on -1, -2, -7, or -9.
bzip2recover on a valid archive produces files named rec*ARCHIVE* Port / libbz2 / usage-bzip2-r20-bzip2-recover-yields-rec-prefix-files Passed
Compresses a 4 KiB deterministic payload into a single archive, runs bzip2recover on the archive, and asserts at least one output file matches the canonical "rec*" naming pattern, exercising the recover utility's naming convention on a valid (non-corrupt) archive distinct from prior tests that asserted block-count or piece-cover behavior.
bzip2 -c | bzip2 -dc pipeline preserves the SHA-256 of a deterministic 16 KiB payload Port / libbz2 / usage-bzip2-r20-bzip2-stdout-pipeline-sha256-matches-source Passed
Generates 16384 bytes of deterministic binary content, pipes it through bzip2 -c into bzip2 -dc, and asserts the SHA-256 of the pipeline output equals the SHA-256 of the source, exercising the chained compress-then-decompress pipeline fidelity via cryptographic-checksum identity at a non-trivial size distinct from prior fixed-string roundtrips.
bunzip2 -q produces no stderr output for a clean archive Port / libbz2 / usage-bzip2-r21-bunzip2-q-quiet-stderr Passed
Compresses a small payload, decompresses with bunzip2 -q -k to stdout, and asserts the captured stderr stream is empty - locking in bunzip2's -q (quiet) behavior on the bunzip2 wrapper (existing tests cover bzip2 -q but not bunzip2 -q on stderr emptiness).
bzcat -f on a non-bzip2 file passes through unchanged Port / libbz2 / usage-bzip2-r21-bzcat-force-missing-no-args Passed
Writes a plain (non-bzip2) text file and runs bzcat -f against it, asserting the captured output equals the source bytes - locking in the -f (force) pass-through behavior of bzcat on uncompressed input, distinct from other -f tests that target bzip2 itself.
bzdiff -q on two archives with identical contents exits 0 with no output Port / libbz2 / usage-bzip2-r21-bzdiff-q-equal-archives-rc-zero Passed
Compresses identical content into two distinct archives, runs bzdiff -q on them, and asserts the exit code is 0 with no stdout/stderr output - locking in the -q quiet flag's silent-success behavior distinct from the existing bzdiff-q-flag test which only checks rc on differing files.
bzgrep -A 2 prints two trailing context lines after each match Port / libbz2 / usage-bzip2-r21-bzgrep-a2-after-context-lines Passed
Compresses a six-line payload and runs bzgrep -A 2 looking for a unique pattern on line 3, then asserts the output contains the match line plus the next two lines verbatim - locking in -A's count semantics specifically (existing batch11 after-context test does not pin output to a numeric line count).
bzgrep -C 1 prints one line of leading and trailing context Port / libbz2 / usage-bzip2-r21-bzgrep-context-flag-symmetric Passed
Compresses a five-line payload, runs bzgrep -C 1 on a unique middle line, and asserts the captured output contains exactly three lines (prev + match + next) - locking in -C's symmetric context behavior which is distinct from -A / -B alone.
bzgrep -x matches only when the pattern spans the entire line Port / libbz2 / usage-bzip2-r21-bzgrep-x-line-regex-anchor Passed
Compresses a four-line payload containing both partial and full matches of a token, runs bzgrep -x 'token' and asserts only the line equal to 'token' is reported - locking in the -x whole-line match semantics specifically (existing bzgrep tests cover -F / -w / -E but not -x line anchoring).
bzip2recover output recXXXX files each decode under bzip2 -t Port / libbz2 / usage-bzip2-r21-bzip2recover-rec-files-decode-individually Passed
Builds a multi-block archive by compressing a 1MB random payload at -9 -1 block size, runs bzip2recover, and asserts each resulting recXXXX.bz2 file passes bzip2 -t independently - locking in the per-block recovery file integrity contract (existing recover tests check piece count or pieces-cover-payload but not per-piece -t pass).
bzip2 -d -s small-mode decompresses a level-9 archive byte-for-byte Port / libbz2 / usage-bzip2-r21-small-flag-roundtrip Passed
Compresses a 256KB payload with bzip2 -9, then decompresses with bzip2 -d -s (small/reduced-memory mode) into stdout and asserts the recovered bytes match the original SHA-256 - locking in the -s reduced-memory decompression code path which is distinct from the default decompressor.
bzip2 stdin->stdout roundtrip preserves a 512KB deterministic payload Port / libbz2 / usage-bzip2-r21-stdin-decompress-large-deterministic Passed
Generates a 512KB deterministic payload using printf and seq, pipes it through bzip2 -c | bzip2 -dc and asserts the SHA-256 of the recovered stream matches the source - locking in a larger-than-typical pipe-roundtrip distinct from prior 1MB random or tiny tests by using a deterministic payload of a different size.
bzip2 -t accepts concatenated multi-stream input on stdin Port / libbz2 / usage-bzip2-r21-test-multistream-stdin Passed
Builds three independent bzip2 streams by compressing three different small payloads and concatenating them into one .bz2 blob, then pipes the blob into bzip2 -t (test-only) on stdin and asserts the exit code is 0 - locking in stdin-piped integrity checking across multi-stream archives.
bzip2 recompresses file Port / libbz2 / usage-bzip2-recompress-file Passed
bzip2 recover listing Port / libbz2 / usage-bzip2-recover-listing Passed
bzip2 round trip preserves chmod 600 Port / libbz2 / usage-bzip2-roundtrip-preserves-mode-600 Passed
Compresses a 0600-mode file in place and decompresses it back, verifying bzip2 carries the restrictive permission bits across the round trip.
bzip2 round-trip preserves restrictive 0600 mode bits Port / libbz2 / usage-bzip2-roundtrip-preserves-setuid Passed
Marks a regular file with chmod 0600 (owner-only read/write), compresses it in place, decompresses it back, and verifies bzip2 carries the restrictive mode bits across the round trip on both the .bz2 and the restored plaintext (the standard mode-preservation path; bzip2 deliberately strips setuid/setgid for safety).
bzip2 round trip via symlink target Port / libbz2 / usage-bzip2-roundtrip-via-symlink Passed
Points a symlink at a real file and verifies bzip2 -c through the symlink reads the target's bytes and produces a stream that decompresses back to the original payload.
bzip2 sample1 fixture Port / libbz2 / usage-bzip2-sample1-fixture Passed
bzip2 sample2 fixture Port / libbz2 / usage-bzip2-sample2-fixture Passed
bzip2 sample3 fixture Port / libbz2 / usage-bzip2-sample3-fixture Passed
bzip2 sample three stdout Port / libbz2 / usage-bzip2-sample3-stdout Passed
bzip2 round-trip preserves binary sha256 Port / libbz2 / usage-bzip2-sha256-roundtrip-binary Passed
Compresses random binary input and verifies the decompressed sha256 matches the original byte-for-byte.
bzip2 short version flag Port / libbz2 / usage-bzip2-short-version-flag Passed
Runs bzip2 -V (short flag) and verifies the version banner identifies the block-sorting compressor.
bzip2 small block Port / libbz2 / usage-bzip2-small-block Passed
bzip2 -s small mode decompresses correctly Port / libbz2 / usage-bzip2-small-mode-decompress Passed
Decompresses a bzip2 stream with the low-memory -s flag and verifies bytes match the original payload.
bzip2 space filename compress Port / libbz2 / usage-bzip2-space-filename-compress Passed
bzip2 space filename decompress Port / libbz2 / usage-bzip2-space-filename-decompress Passed
bzip2 stdin file output Port / libbz2 / usage-bzip2-stdin-file-output Passed
bzip2 -d rejects non-bzip2 stdin Port / libbz2 / usage-bzip2-stdin-no-output-file-on-error Passed
Pipes plain text into bzip2 -d and verifies the command exits non-zero, reports a not-a-bzip2-file error, and produces no decoded output bytes on stdout.
bzip2 pipeline roundtrip Port / libbz2 / usage-bzip2-stdin-pipe-roundtrip Passed
Pipes bzip2 -c output directly into bzip2 -dc and verifies the round-tripped payload matches the source byte-for-byte.
bzip2 stdin roundtrip Port / libbz2 / usage-bzip2-stdin-roundtrip Passed
Compresses stdin with bzip2, decompresses the resulting stream, and verifies the restored plaintext payload.
bzip2 stdin stdout round trip Port / libbz2 / usage-bzip2-stdin-stdout-roundtrip Passed
Compresses data from stdin with bzip2, decompresses to stdout, and verifies the original payload returns intact.
bzip2 stdout keep input Port / libbz2 / usage-bzip2-stdout-keep-input Passed
Compresses a file to stdout with bzip2 -k, keeps the original input, and verifies both original and restored output content.
bzip2 piped directly to bunzip2 Port / libbz2 / usage-bzip2-stdout-pipe-into-bunzip2 Passed
Pipes bzip2 -c output straight into bunzip2 -c without any intermediate file and verifies the decoded byte stream matches the original payload exactly.
bzip2 -c piped into bzip2 -t - Port / libbz2 / usage-bzip2-stdout-pipeline-tc Passed
Pipes plaintext into bzip2 -c (compress to stdout) and immediately into bzip2 -t - (test the stream from stdin), verifying the pipeline reports a healthy stream and that an out-of-band decompression of the captured pipeline output reproduces the input bytes.
bzip2 stdout spaced file Port / libbz2 / usage-bzip2-stdout-space-file Passed
Compresses a spaced filename to stdout with bzip2 and verifies a later decompression round trip.
bzip2 stdout stream Port / libbz2 / usage-bzip2-stdout-stream Passed
bzip2 -c piped through tee Port / libbz2 / usage-bzip2-stdout-tee-two-sinks Passed
Streams bzip2 -c output through tee into two separate sinks and verifies both files are byte-identical and decompress back to the original payload.
tar -j round-trips through bzip2 Port / libbz2 / usage-bzip2-tar-j-stream-roundtrip Passed
Creates a bzip2-compressed tarball with tar -cjf and extracts it with tar -xjf, verifying every member's bytes match the originals.
tar -tjf lists members of a bzip2 archive Port / libbz2 / usage-bzip2-tar-tjf-listing Passed
Builds a bzip2-compressed tarball and verifies tar -tjf prints exactly the expected member names in order without extracting.
bzip2 -t rejects empty file Port / libbz2 / usage-bzip2-test-empty-file Passed
Runs bzip2 -t on a zero-byte file and verifies it fails with a non-zero exit status and a diagnostic on stderr.
bzip2 test multiple files Port / libbz2 / usage-bzip2-test-multi-files Passed
Runs bzip2 -t on two compressed files in a single invocation and verifies both pass the integrity check.
bzip2 -tq quiet test mode Port / libbz2 / usage-bzip2-test-quiet-suppresses-banner Passed
Runs bzip2 -tq on a known-good archive and verifies the integrity check passes silently with no output on stdout or stderr.
bzip2 tests sample1 fixture Port / libbz2 / usage-bzip2-test-sample1 Passed
bzip2 tests sample2 fixture Port / libbz2 / usage-bzip2-test-sample2 Passed
bzip2 tests sample3 fixture Port / libbz2 / usage-bzip2-test-sample3 Passed
bzip2 test stream Port / libbz2 / usage-bzip2-test-stream Passed
bzip2 -t rejects a stream with a corrupted internal byte Port / libbz2 / usage-bzip2-test-trailing-junk-byte Passed
Flips an internal byte inside a valid bzip2 compressed stream and verifies bzip2 -t reports an integrity / corruption error rather than silently accepting the tampered file.
bzip2 -tv reports ok on perfect file Port / libbz2 / usage-bzip2-test-verbose-perfect-file Passed
Runs bzip2 -tv against a freshly compressed valid stream and verifies the verbose report names the file and reports ok.
bzip2 test verbose Port / libbz2 / usage-bzip2-test-verbose Passed
bzip2 three concatenated streams Port / libbz2 / usage-bzip2-three-stream-concat Passed
Appends three bzip2 streams into a single file and verifies bzip2 -dc emits all three plaintext payloads in order.
bzip2 round-trip on single-byte input Port / libbz2 / usage-bzip2-tiny-input-roundtrip Passed
bzip2 -t rejects truncated archive Port / libbz2 / usage-bzip2-truncated-archive-rejected Passed
Truncates the trailing bytes of a valid .bz2 stream and verifies bzip2 -t fails with a non-zero exit and an unexpected-end-of-file or integrity diagnostic on stderr.
bzip2 -V emits the canonical version banner format Port / libbz2 / usage-bzip2-uppercase-v-version-format Passed
Runs bzip2 -V and verifies the emitted banner matches the canonical "bzip2, a block-sorting file compressor. Version <X.Y.Z>" format, exposing copyright attribution and the parseable version triple.
bzip2 -V emits a strictly formatted "Version X.Y.Z, dd-Mon-yyyy" line Port / libbz2 / usage-bzip2-v-flag-version-line-format Passed
Runs bzip2 -V, captures the banner from stdout+stderr (the upstream banner historically goes to stderr with exit 1), and verifies a single canonical "Version X.Y.Z, dd-Mon-yyyy" line is present alongside the program name, "block-sorting" wording, copyright, and the Julian Seward attribution.
bzip2 verbose stdin stats Port / libbz2 / usage-bzip2-verbose-stdin-stats Passed
Compresses stdin with bzip2 -v and verifies the verbose stats line reports the stdin label and bits/byte ratio.
bzip2 verbose test file Port / libbz2 / usage-bzip2-verbose-test-file Passed
bzip2 verbose integrity check Port / libbz2 / usage-bzip2-verbose-test Passed
bzip2 version query Port / libbz2 / usage-bzip2-version-query Passed
bzip2 -vv double verbose compress Port / libbz2 / usage-bzip2-vv-double-verbose Passed
Compresses a multi-block payload with bzip2 -vv and verifies the second verbosity level emits per-block CRC accounting alongside the final combined CRC line.
bzip2 stream magic bytes via od Port / libbz2 / usage-bzip2-xxd-magic-bytes Passed
Compresses input with bzip2 -9 and uses od -An -tx1 to verify the first six bytes form the expected BZh9 + pi-block magic (42 5a 68 39 31 41).
bzip2recover pieces concatenate into the original stream Port / libbz2 / usage-bzip2recover-concatenate-pieces Passed
Splits a multi-block stream with bzip2recover, concatenates the rec*.bz2 fragments in lexical order, and verifies bzcat over the concatenation reproduces the original payload exactly.
bzip2recover salvages blocks from corrupted stream Port / libbz2 / usage-bzip2recover-corrupt-pieces Passed
Corrupts a multi-block bzip2 stream and verifies bzip2recover emits per-block rec*.bz2 fragments.
bzip2recover produces exactly the expected number of pieces Port / libbz2 / usage-bzip2recover-exact-piece-count Passed
Compresses a payload large enough to span exactly N bzip2 -1 (100k) blocks, runs bzip2recover, and verifies the produced rec*.bz2 piece count equals N - matching the per-block stderr "block 1 to 1" line count emitted by bzip2recover.
bzip2recover pieces each decompress to a non-empty payload slice Port / libbz2 / usage-bzip2recover-pieces-decompress-individually Passed
Splits a multi-block bzip2 stream with bzip2recover, decompresses each piece on its own, and verifies every slice is non-empty and the concatenation in lexical order equals the original input byte-for-byte.
bzcat decompresses file to stdout Port / libbz2 / usage-bzless-decompresses-file Passed
Decompresses a .bz2 file through bzcat (the pipeline-friendly pager-free counterpart of bzless) and verifies the plaintext lines round-trip on stdout.
bzmore exits cleanly on q Port / libbz2 / usage-bzmore-q-quits-cleanly Passed
Pipes a 'q' keystroke into bzmore over a compressed file and verifies bzmore exits zero without dumping the entire payload to stdout.
bzmore shows first lines Port / libbz2 / usage-bzmore-shows-first-lines Passed
Runs bzmore with cat as the pager on a multi-line compressed file and verifies the first three plaintext lines appear in order at the start of the output.
CVE-2005-1260 libbz2 regression Port / libbz2 / cve-2005-1260 Passed
Asserts that bzip2 makes forward progress on malformed bz2 input and rejects it within a bounded time, instead of spinning in the historical decompression-bomb infinite loop.
CVE-2010-0405 libbz2 regression Port / libbz2 / cve-2010-0405 Passed
Asserts that BZ2_decompress validates internal counts and rejects a corrupted bz2 block instead of letting unchecked arithmetic on attacker-controlled selector counts drive a crash or out-of-bounds access.