summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@fb.com>2022-01-18 02:00:22 -0800
committerJim Meyering <meyering@fb.com>2022-01-18 02:00:22 -0800
commitae8fb00111ba0c4922609cd9beb552fb41b66cc6 (patch)
treef05202d03519977cb224ecc7e07a4f19f4e07e22
parent6c8ff6a8f3c80f86e703a3fc2a0ffb81e87f0957 (diff)
downloadautomake-ae8fb00111ba0c4922609cd9beb552fb41b66cc6.tar.gz
tests: fix py-compile-basedir.sh: missing "test"
Prompted by a patch from Thomas Deutschmann <whissi@gentoo.org>, via https://lists.gnu.org/r/automake-patches/2022-01/msg00001.html: commit v1.16.1-26-gb279a0d46 ("tests: in python tests, do not require .pyo files (for python3)") was missing a `test` call. Reported to Gentoo at https://bugs.gentoo.org/715040. * t/py-compile-basedir.sh: Rather than just adding the missing "test", rewrite using a case statement, to avoid some duplication.
-rw-r--r--t/py-compile-basedir.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/py-compile-basedir.sh b/t/py-compile-basedir.sh
index 44b6b07c1..22e605f9d 100644
--- a/t/py-compile-basedir.sh
+++ b/t/py-compile-basedir.sh
@@ -43,7 +43,7 @@ for d in foo foo/bar "$(pwd)/foo" . .. ../foo ''; do
py_installed "$d2/sub/$f.pyc"
files=$(find "$d2" | grep '\.py[co]$')
# with new-enough Python3, there are six files.
- test $(echo "$files" | wc -l) -eq 4 || $(echo "$files" | wc -l) -eq 6
+ case $(echo "$files" | wc -l) in 4|6) ;; *) false;; esac
case $d2 in
.|..) rm -f $files;;
*) rm -rf "$d2";;