summaryrefslogtreecommitdiffstats
path: root/tests/gnu
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2022-12-16 14:17:07 -0500
committerTavian Barnes <tavianator@tavianator.com>2022-12-16 14:17:07 -0500
commite01042b84abdfa224d47e6d11eb9798ce4c7d2f8 (patch)
treef55d5e3adfa5a5fb23119d9b149c76c289c12a0d /tests/gnu
parent681f14f7cdff2d8fae235b8fd09745cfcb93e666 (diff)
downloadbfs-e01042b84abdfa224d47e6d11eb9798ce4c7d2f8.tar.xz
tests: Replace skip_unless test with test || skip
Diffstat (limited to 'tests/gnu')
-rw-r--r--tests/gnu/exec_flush_fail.sh2
-rw-r--r--tests/gnu/exec_plus_flush_fail.sh2
-rw-r--r--tests/gnu/fprint_error.sh2
-rw-r--r--tests/gnu/fprint_noerror.sh2
-rw-r--r--tests/gnu/fstype.sh3
-rw-r--r--tests/gnu/gid_plus.sh2
-rw-r--r--tests/gnu/gid_plus_plus.sh2
-rw-r--r--tests/gnu/inum_automount.sh6
-rw-r--r--tests/gnu/iwholename.sh2
-rw-r--r--tests/gnu/print_error.sh2
-rw-r--r--tests/gnu/regex_invalid_utf8.sh6
-rw-r--r--tests/gnu/regextype_emacs.sh2
-rw-r--r--tests/gnu/regextype_grep.sh2
-rw-r--r--tests/gnu/uid_plus.sh2
-rw-r--r--tests/gnu/uid_plus_plus.sh2
-rw-r--r--tests/gnu/xtype_bind_mount.sh4
16 files changed, 21 insertions, 22 deletions
diff --git a/tests/gnu/exec_flush_fail.sh b/tests/gnu/exec_flush_fail.sh
index 4772a14..ce796b2 100644
--- a/tests/gnu/exec_flush_fail.sh
+++ b/tests/gnu/exec_flush_fail.sh
@@ -1,3 +1,3 @@
# Failure to flush streams before exec should be caught
-skip_unless test -e /dev/full
+test -e /dev/full || skip
fail invoke_bfs basic -print0 -exec true \; >/dev/full
diff --git a/tests/gnu/exec_plus_flush_fail.sh b/tests/gnu/exec_plus_flush_fail.sh
index 5c74fd8..8beee09 100644
--- a/tests/gnu/exec_plus_flush_fail.sh
+++ b/tests/gnu/exec_plus_flush_fail.sh
@@ -1,2 +1,2 @@
-skip_unless test -e /dev/full
+test -e /dev/full || skip
fail invoke_bfs basic/a -print0 -exec echo found {} + >/dev/full
diff --git a/tests/gnu/fprint_error.sh b/tests/gnu/fprint_error.sh
index e7f2394..0e75b0e 100644
--- a/tests/gnu/fprint_error.sh
+++ b/tests/gnu/fprint_error.sh
@@ -1,2 +1,2 @@
-skip_unless test -e /dev/full
+test -e /dev/full || skip
fail invoke_bfs basic -maxdepth 0 -fprint /dev/full
diff --git a/tests/gnu/fprint_noerror.sh b/tests/gnu/fprint_noerror.sh
index 142e935..f13a62b 100644
--- a/tests/gnu/fprint_noerror.sh
+++ b/tests/gnu/fprint_noerror.sh
@@ -1,3 +1,3 @@
# Regression test: /dev/full should not fail until actually written to
-skip_unless test -e /dev/full
+test -e /dev/full || skip
invoke_bfs basic -false -fprint /dev/full
diff --git a/tests/gnu/fstype.sh b/tests/gnu/fstype.sh
index 939438e..05645c3 100644
--- a/tests/gnu/fstype.sh
+++ b/tests/gnu/fstype.sh
@@ -1,3 +1,2 @@
-fstype=$(invoke_bfs basic -maxdepth 0 -printf '%F\n')
-skip_if test $? -ne 0
+fstype=$(invoke_bfs basic -maxdepth 0 -printf '%F\n') || skip
bfs_diff basic -fstype "$fstype"
diff --git a/tests/gnu/gid_plus.sh b/tests/gnu/gid_plus.sh
index 8ad493b..ccba0e6 100644
--- a/tests/gnu/gid_plus.sh
+++ b/tests/gnu/gid_plus.sh
@@ -1,2 +1,2 @@
-skip_if test "$(id -g)" -eq 0
+test "$(id -g)" -eq 0 && skip
bfs_diff basic -gid +0
diff --git a/tests/gnu/gid_plus_plus.sh b/tests/gnu/gid_plus_plus.sh
index 7982633..ec7ae86 100644
--- a/tests/gnu/gid_plus_plus.sh
+++ b/tests/gnu/gid_plus_plus.sh
@@ -1,2 +1,2 @@
-skip_if test "$(id -g)" -eq 0
+test "$(id -g)" -eq 0 && skip
bfs_diff basic -gid ++0
diff --git a/tests/gnu/inum_automount.sh b/tests/gnu/inum_automount.sh
index 648ea05..6bf2977 100644
--- a/tests/gnu/inum_automount.sh
+++ b/tests/gnu/inum_automount.sh
@@ -1,11 +1,11 @@
# bfs shouldn't trigger automounts unless it descends into them
-skip_unless test "$SUDO"
-skip_unless command -v systemd-mount &>/dev/null
+test "$SUDO" || skip
+command -v systemd-mount &>/dev/null || skip
clean_scratch
mkdir scratch/{foo,automnt}
-skip_unless sudo systemd-mount -A -o bind basic scratch/automnt
+sudo systemd-mount -A -o bind basic scratch/automnt || skip
before=$(inum scratch/automnt)
bfs_diff scratch -inum "$before" -prune
diff --git a/tests/gnu/iwholename.sh b/tests/gnu/iwholename.sh
index 67e9630..0b2d038 100644
--- a/tests/gnu/iwholename.sh
+++ b/tests/gnu/iwholename.sh
@@ -1,2 +1,2 @@
-skip_unless invoke_bfs -quit -iwholename PATTERN
+invoke_bfs -quit -iwholename PATTERN || skip
bfs_diff basic -iwholename 'basic/*F*'
diff --git a/tests/gnu/print_error.sh b/tests/gnu/print_error.sh
index 9fd5af5..62a32b4 100644
--- a/tests/gnu/print_error.sh
+++ b/tests/gnu/print_error.sh
@@ -1,2 +1,2 @@
-skip_unless test -e /dev/full
+test -e /dev/full || skip
fail invoke_bfs basic -maxdepth 0 >/dev/full
diff --git a/tests/gnu/regex_invalid_utf8.sh b/tests/gnu/regex_invalid_utf8.sh
index edb4b1e..603d688 100644
--- a/tests/gnu/regex_invalid_utf8.sh
+++ b/tests/gnu/regex_invalid_utf8.sh
@@ -1,8 +1,8 @@
clean_scratch
# Incomplete UTF-8 sequences
-skip_unless touch scratch/$'\xC3'
-skip_unless touch scratch/$'\xE2\x84'
-skip_unless touch scratch/$'\xF0\x9F\x92'
+touch scratch/$'\xC3' || skip
+touch scratch/$'\xE2\x84' || skip
+touch scratch/$'\xF0\x9F\x92' || skip
bfs_diff scratch -regex 'scratch/..'
diff --git a/tests/gnu/regextype_emacs.sh b/tests/gnu/regextype_emacs.sh
index d0f68cc..3cc388c 100644
--- a/tests/gnu/regextype_emacs.sh
+++ b/tests/gnu/regextype_emacs.sh
@@ -1,3 +1,3 @@
-skip_unless invoke_bfs -regextype emacs -quit
+invoke_bfs -regextype emacs -quit || skip
bfs_diff basic -regextype emacs -regex '.*/\(f+o?o?\|bar\)'
diff --git a/tests/gnu/regextype_grep.sh b/tests/gnu/regextype_grep.sh
index 0136700..0830667 100644
--- a/tests/gnu/regextype_grep.sh
+++ b/tests/gnu/regextype_grep.sh
@@ -1,3 +1,3 @@
-skip_unless invoke_bfs -regextype grep -quit
+invoke_bfs -regextype grep -quit || skip
bfs_diff basic -regextype grep -regex '.*/f\+o\?o\?'
diff --git a/tests/gnu/uid_plus.sh b/tests/gnu/uid_plus.sh
index fc4bce3..22b2c8e 100644
--- a/tests/gnu/uid_plus.sh
+++ b/tests/gnu/uid_plus.sh
@@ -1,2 +1,2 @@
-skip_if test "$(id -u)" -eq 0
+test "$(id -u)" -eq 0 && skip
bfs_diff basic -uid +0
diff --git a/tests/gnu/uid_plus_plus.sh b/tests/gnu/uid_plus_plus.sh
index 5d5e086..e021888 100644
--- a/tests/gnu/uid_plus_plus.sh
+++ b/tests/gnu/uid_plus_plus.sh
@@ -1,2 +1,2 @@
-skip_if test "$(id -u)" -eq 0
+test "$(id -u)" -eq 0 && skip
bfs_diff basic -uid ++0
diff --git a/tests/gnu/xtype_bind_mount.sh b/tests/gnu/xtype_bind_mount.sh
index 264b6f8..a6dbed3 100644
--- a/tests/gnu/xtype_bind_mount.sh
+++ b/tests/gnu/xtype_bind_mount.sh
@@ -1,5 +1,5 @@
-skip_unless test "$SUDO"
-skip_unless test "$UNAME" = "Linux"
+test "$SUDO" || skip
+test "$UNAME" = "Linux" || skip
clean_scratch
"$XTOUCH" scratch/{file,null}