Add tests for options with G, GB and GiB suffixes
This commit is contained in:
@@ -35,6 +35,30 @@ rm file.zst
|
||||
println "+ zstd --memory=1MiB file"
|
||||
zstd -q --memory=1MiB file && die "Should allow numeric parameter with expected suffix"
|
||||
rm file.zst
|
||||
println "+ zstd --memory=1G file"
|
||||
zstd -q --memory=1G file && die "Should allow numeric parameter with expected suffix"
|
||||
rm file.zst
|
||||
println "+ zstd --memory=1GB file"
|
||||
zstd -q --memory=1GB file && die "Should allow numeric parameter with expected suffix"
|
||||
rm file.zst
|
||||
println "+ zstd --memory=1GiB file"
|
||||
zstd -q --memory=1GiB file && die "Should allow numeric parameter with expected suffix"
|
||||
rm file.zst
|
||||
println "+ zstd --memory=3G file"
|
||||
zstd -q --memory=3G file && die "Should allow numeric parameter with expected suffix"
|
||||
rm file.zst
|
||||
println "+ zstd --memory=3GB file"
|
||||
zstd -q --memory=3GB file && die "Should allow numeric parameter with expected suffix"
|
||||
rm file.zst
|
||||
println "+ zstd --memory=3GiB file"
|
||||
zstd -q --memory=3GiB file && die "Should allow numeric parameter with expected suffix"
|
||||
rm file.zst
|
||||
println "+ zstd --memory=4G file"
|
||||
zstd --memory=4G file && die "Should not allow out-of-bound numeric parameter"
|
||||
println "+ zstd --memory=4GB file"
|
||||
zstd --memory=4GB file && die "Should not allow out-of-bound numeric parameter"
|
||||
println "+ zstd --memory=4GiB file"
|
||||
zstd --memory=4GiB file && die "Should not allow out-of-bound numeric parameter"
|
||||
|
||||
rm file
|
||||
exit 0
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
error: only numeric values with optional suffixes K, KB, KiB, M, MB, MiB are allowed
|
||||
error: only numeric values with optional suffixes K, KB, KiB, M, MB, MiB are allowed
|
||||
error: only numeric values with optional suffixes K, KB, KiB, M, MB, MiB are allowed
|
||||
error: only numeric values with optional suffixes K, KB, KiB, M, MB, MiB are allowed
|
||||
error: only numeric values with optional suffixes K, KB, KiB, M, MB, MiB are allowed
|
||||
error: only numeric values with optional suffixes K, KB, KiB, M, MB, MiB are allowed
|
||||
error: only numeric values with optional suffixes K, KB, KiB, M, MB, MiB, G, GB, GiB are allowed
|
||||
error: only numeric values with optional suffixes K, KB, KiB, M, MB, MiB, G, GB, GiB are allowed
|
||||
error: only numeric values with optional suffixes K, KB, KiB, M, MB, MiB, G, GB, GiB are allowed
|
||||
error: only numeric values with optional suffixes K, KB, KiB, M, MB, MiB, G, GB, GiB are allowed
|
||||
error: only numeric values with optional suffixes K, KB, KiB, M, MB, MiB, G, GB, GiB are allowed
|
||||
error: only numeric values with optional suffixes K, KB, KiB, M, MB, MiB, G, GB, GiB are allowed
|
||||
Should allow numeric parameter without suffix
|
||||
Should allow numeric parameter with expected suffix
|
||||
Should allow numeric parameter with expected suffix
|
||||
@@ -11,3 +11,12 @@ Should allow numeric parameter with expected suffix
|
||||
Should allow numeric parameter with expected suffix
|
||||
Should allow numeric parameter with expected suffix
|
||||
Should allow numeric parameter with expected suffix
|
||||
Should allow numeric parameter with expected suffix
|
||||
Should allow numeric parameter with expected suffix
|
||||
Should allow numeric parameter with expected suffix
|
||||
Should allow numeric parameter with expected suffix
|
||||
Should allow numeric parameter with expected suffix
|
||||
Should allow numeric parameter with expected suffix
|
||||
error: numeric value overflows 32-bit unsigned int
|
||||
error: numeric value overflows 32-bit unsigned int
|
||||
error: numeric value overflows 32-bit unsigned int
|
||||
|
||||
@@ -11,3 +11,12 @@
|
||||
+ zstd --memory=1M file
|
||||
+ zstd --memory=1MB file
|
||||
+ zstd --memory=1MiB file
|
||||
+ zstd --memory=1G file
|
||||
+ zstd --memory=1GB file
|
||||
+ zstd --memory=1GiB file
|
||||
+ zstd --memory=3G file
|
||||
+ zstd --memory=3GB file
|
||||
+ zstd --memory=3GiB file
|
||||
+ zstd --memory=4G file
|
||||
+ zstd --memory=4GB file
|
||||
+ zstd --memory=4GiB file
|
||||
|
||||
Reference in New Issue
Block a user