From 73bb9924a280e97f1f54be30e4b1cb600070210d Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 30 Sep 2022 18:48:11 -0500 Subject: [PATCH] Make skipnot and toyonly play nice together. --- scripts/runtest.sh | 2 +- tests/tar.test | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/runtest.sh b/scripts/runtest.sh index 373c7c5b..4b690e8e 100644 --- a/scripts/runtest.sh +++ b/scripts/runtest.sh @@ -108,7 +108,7 @@ toyonly() case "$IS_TOYBOX" in toybox*) ;; This\ is\ not\ GNU*) ;; - *) ((++SKIP)) ;; + *) [ $SKIP -eq 0 ] && ((++SKIP)) ;; esac "$@" diff --git a/tests/tar.test b/tests/tar.test index cb246af6..5846ffbb 100755 --- a/tests/tar.test +++ b/tests/tar.test @@ -227,9 +227,9 @@ toyonly testing "cat tbz | extract dir/file (autodetect)" \ "dir/\ndir/file\ndrwxr-x--- 1494637555 dd/dir\n-rw-r----- 1494637555 dd/dir/file\n" \ "" "" -mkdir path && ln -s "$(which gzip)" "$(which tar)" path/ -toyonly [ -x path/gzip ] -testing "autodetect falls back to gzip -d when no zcat" \ +mkdir path && ln -s "$(which gzip)" "$(which tar)" path/ && [ -x path/gzip ] || + ((++SKIP)) +toyonly testing "autodetect falls back to gzip -d when no zcat" \ "PATH=path; tar tf $FILES/tar/tar.tgz" "dir/\ndir/file\n" "" "" rm -rf path -- 2.39.2