1#!/bin/sh 2 3echo "some data" > file 4 5println "+ zstd --memory=32LB file" 6zstd --memory=32LB file && die "Should not allow bogus suffix" 7println "+ zstd --memory=32LiB file" 8zstd --memory=32LiB file && die "Should not allow bogus suffix" 9println "+ zstd --memory=32A file" 10zstd --memory=32A file && die "Should not allow bogus suffix" 11println "+ zstd --memory=32r82347dn83 file" 12zstd --memory=32r82347dn83 file && die "Should not allow bogus suffix" 13println "+ zstd --memory=32asbdf file" 14zstd --memory=32asbdf file && die "Should not allow bogus suffix" 15println "+ zstd --memory=hello file" 16zstd --memory=hello file && die "Should not allow non-numeric parameter" 17println "+ zstd --memory=1 file" 18zstd -q --memory=1 file && die "Should allow numeric parameter without suffix" 19rm file.zst 20println "+ zstd --memory=1K file" 21zstd -q --memory=1K file && die "Should allow numeric parameter with expected suffix" 22rm file.zst 23println "+ zstd --memory=1KB file" 24zstd -q --memory=1KB file && die "Should allow numeric parameter with expected suffix" 25rm file.zst 26println "+ zstd --memory=1KiB file" 27zstd -q --memory=1KiB file && die "Should allow numeric parameter with expected suffix" 28rm file.zst 29println "+ zstd --memory=1M file" 30zstd -q --memory=1M file && die "Should allow numeric parameter with expected suffix" 31rm file.zst 32println "+ zstd --memory=1MB file" 33zstd -q --memory=1MB file && die "Should allow numeric parameter with expected suffix" 34rm file.zst 35println "+ zstd --memory=1MiB file" 36zstd -q --memory=1MiB file && die "Should allow numeric parameter with expected suffix" 37rm file.zst 38 39rm file 40exit 0 41