From b42eab6dd012fb3786a459881ad4e5ce8c62b0c7 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 24 Nov 2026 12:20:45 -0600 Subject: [PATCH] Convert zcat.test to shorter tsc/tst. --- tests/zcat.test | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/zcat.test b/tests/zcat.test index 878a11d4..d400347c 100755 --- a/tests/zcat.test +++ b/tests/zcat.test @@ -8,12 +8,11 @@ echo -n "hi " | gzip > 1.gz echo "there" | gzip > 2.gz # zcat is basically just gzip -dc -testcmd "files" "1.gz 2.gz && test -f 1.gz && test -f 2.gz" "hi there\n" "" "" +tsc files '1.gz 2.gz && test -f 1.gz && test -f 2.gz' 'hi there\n' # zcat -c is allowed but changes nothing -testcmd "-c" "-c 1.gz 2.gz && test -f 1.gz && test -f 2.gz" "hi there\n" "" "" -testing "concatenated" "{ cat 1.gz 2.gz; } | zcat" "hi there\n" "" "" -testing "error" "head -c 10 2.gz | { zcat 2>/dev/null || echo fail; }" "fail\n"\ - "" "" +tsc -c '-c 1.gz 2.gz && test -f 1.gz && test -f 2.gz' 'hi there\n' +tst concatenated '{ cat 1.gz 2.gz; } | zcat' 'hi there\n' +tst error 'head -c 10 2.gz | { zcat 2>/dev/null || echo fail; }' 'fail\n' # TODO: how to test "zcat -f"? -- 2.39.5