summaryrefslogtreecommitdiff
path: root/src/tests/man-recode-in-place
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2022-03-07 18:55:49 +0000
committerColin Watson <cjwatson@debian.org>2022-03-07 18:58:32 +0000
commitd87cba420f7678bf1909de82e885f5b80ac49139 (patch)
treeb26a30669fde72e3a78f3e60554f3281c25895b4 /src/tests/man-recode-in-place
parent25883e0f55f07395745ad893ec98148afa93a3f3 (diff)
tests: Make pass/fail reporting more shellcheck-friendly
* src/tests/testlib.sh (report): New function, similar to expect_pass but taking an exit code rather than a command string to evaluate. (expect_pass): Remove. (expect_files_equal): Refactor using report function. * src/tests/man-deleted-directory, src/tests/man-executable-page-on-path, src/tests/man-missing-locales, src/tests/man-recode-in-place, src/tests/manconv-incomplete-char-at-eof, src/tests/mandb-bogus-symlink, src/tests/mandb-cachedir-tag, src/tests/mandb-empty-page, src/tests/mandb-purge-updates-timestamp: Refactor to use report function rather than expect_pass.
Diffstat (limited to 'src/tests/man-recode-in-place')
-rwxr-xr-xsrc/tests/man-recode-in-place4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tests/man-recode-in-place b/src/tests/man-recode-in-place
index c6bb05e5..5c899dbe 100755
--- a/src/tests/man-recode-in-place
+++ b/src/tests/man-recode-in-place
@@ -40,7 +40,7 @@ expect_files_equal '--in-place with gzip and coding tag matching target encoding
expect_files_equal \
'--in-place with gzip and coding tag not matching target encoding' \
"$tmpdir/c.1.exp" "$tmpdir/c.1"
-expect_pass '--in-place removes compressed input files' \
- 'test ! -f "$tmpdir/b.1.gz" && test ! -f "$tmpdir/c.1.gz"'
+test ! -f "$tmpdir/b.1.gz" && test ! -f "$tmpdir/c.1.gz"
+report '--in-place removes compressed input files' "$?"
finish