Skip to content

Commit 7da1c6d

Browse files
fix cli-tests issues
1 parent 6a86db1 commit 7da1c6d

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

tests/cli-tests/compression/basic.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ zstd --stdout file | zstd -t
2525
println bob | zstd | zstd -t
2626

2727
# Test keeping input file when compressing to stdout in gzip mode
28-
$ZSTD_SYMLINK_DIR/gzip -c file | zstd -t ; test -f file
29-
$ZSTD_SYMLINK_DIR/gzip --stdout file | zstd -t ; test -f file
28+
if $(command -v $ZSTD_SYMLINK_DIR/gzip); then
29+
$ZSTD_SYMLINK_DIR/gzip -c file | zstd -t ; test -f file
30+
$ZSTD_SYMLINK_DIR/gzip --stdout file | zstd -t ; test -f file
31+
fi
3032

3133
# Test --rm
3234
cp file file-rm

tests/cli-tests/compression/gzip-compat.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ set -e
66
# set -v
77

88
# Test gzip specific compression option
9-
$ZSTD_SYMLINK_DIR/gzip --fast file ; $ZSTD_SYMLINK_DIR/gzip -d file.gz
10-
$ZSTD_SYMLINK_DIR/gzip --best file ; $ZSTD_SYMLINK_DIR/gzip -d file.gz
9+
if $(command -v $ZSTD_SYMLINK_DIR/gzip); then
10+
$ZSTD_SYMLINK_DIR/gzip --fast file ; $ZSTD_SYMLINK_DIR/gzip -d file.gz
11+
$ZSTD_SYMLINK_DIR/gzip --best file ; $ZSTD_SYMLINK_DIR/gzip -d file.gz
1112

12-
# Test -n / --no-name: do not embed original filename in archive
13-
$ZSTD_SYMLINK_DIR/gzip -n file ; grep -qv file file.gz ; $ZSTD_SYMLINK_DIR/gzip -d file.gz
14-
$ZSTD_SYMLINK_DIR/gzip --no-name file ; grep -qv file file.gz ; $ZSTD_SYMLINK_DIR/gzip -d file.gz
15-
$ZSTD_SYMLINK_DIR/gzip -c --no-name file | grep -qv file
13+
# Test -n / --no-name: do not embed original filename in archive
14+
$ZSTD_SYMLINK_DIR/gzip -n file ; grep -qv file file.gz ; $ZSTD_SYMLINK_DIR/gzip -d file.gz
15+
$ZSTD_SYMLINK_DIR/gzip --no-name file ; grep -qv file file.gz ; $ZSTD_SYMLINK_DIR/gzip -d file.gz
16+
$ZSTD_SYMLINK_DIR/gzip -c --no-name file | grep -qv file
17+
fi

tests/cli-tests/compression/window-resize.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22
datagen -g1G > file
3-
zstd --long=31 -1 --single-thread --no-content-size -f file
3+
zstd --long=30 -1 --single-thread --no-content-size -f file
44
zstd -l -v file.zst
55

66
# We want to ignore stderr (its outputting "*** zstd command line interface

0 commit comments

Comments
 (0)