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