diff options
author | Jia Tan <jiat0218@gmail.com> | 2023-07-14 21:30:25 +0800 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2023-07-18 13:26:48 +0300 |
commit | 6e21f1b4e2c580b64d258e3b81ac9e44d53b9283 (patch) | |
tree | 79333516076630567af8785ce983b167d0085e65 /tests/test_compress.sh | |
parent | Translations: Update the Chinese (traditional) translation. (diff) | |
download | xz-6e21f1b4e2c580b64d258e3b81ac9e44d53b9283.tar.xz |
Tests: Improve feature testing for skipping.
Fixed a bug where test_compress_* would all fail if arm64 or armthumb
filters were enabled for compression but arm was disabled. Since the
grep tests only checked for "define HAVE_ENCODER_ARM", this would match
on HAVE_ENCODER_ARM64 or HAVE_ENCODER_ARMTHUMB.
Now the config.h feature test requires " 1" at the end to prevent the
prefix problem. have_feature() was also updated for this even though
there were known current bugs affecting it. This is just in case future
features have a similar prefix problem.
Diffstat (limited to 'tests/test_compress.sh')
-rwxr-xr-x | tests/test_compress.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_compress.sh b/tests/test_compress.sh index 61d20ce9..0aa81001 100755 --- a/tests/test_compress.sh +++ b/tests/test_compress.sh @@ -130,8 +130,8 @@ test_xz -4 test_filter() { - grep "define HAVE_ENCODER_$1" ../config.h > /dev/null || return - grep "define HAVE_DECODER_$1" ../config.h > /dev/null || return + grep "define HAVE_ENCODER_$1 1" ../config.h > /dev/null || return + grep "define HAVE_DECODER_$1 1" ../config.h > /dev/null || return shift test_xz "$@" --lzma2=dict=64KiB,nice=32,mode=fast } |