aboutsummaryrefslogtreecommitdiff
path: root/tests/create_compress_files.c
diff options
context:
space:
mode:
authorJia Tan <jiat0218@gmail.com>2023-01-04 23:58:58 +0800
committerGitHub <noreply@github.com>2023-01-04 23:58:58 +0800
commit52380678f42364daa4510f92f6d3b18ec98c3638 (patch)
tree36db71569ea751be2af331906fd3032475f70ff3 /tests/create_compress_files.c
parentTranslations: Add Korean translation of man pages. (diff)
downloadxz-52380678f42364daa4510f92f6d3b18ec98c3638.tar.xz
Tests: Replace non portable shell parameter expansion
The shell parameter expansion using # and ## is not supported in Solaris 10 Bourne shell (/bin/sh). Even though this is POSIX, it is not fully portable, so we should avoid it.
Diffstat (limited to 'tests/create_compress_files.c')
-rw-r--r--tests/create_compress_files.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/create_compress_files.c b/tests/create_compress_files.c
index 797a73e7..76aa3e30 100644
--- a/tests/create_compress_files.c
+++ b/tests/create_compress_files.c
@@ -24,7 +24,7 @@
// Avoid re-creating the test files every time the tests are run.
#define maybe_create_test(argc, argv, name) \
do { \
- if ((argc < 2 || strcmp(argv[1], #name) == 0) \
+ if ((argc < 2 || strcmp(argv[1], "compress_generated_" #name) == 0) \
&& !file_exists("compress_generated_" #name)) { \
FILE *file = file_create("compress_generated_" #name); \
write_ ## name(file); \