Welcome to little lamb

Code » test-hashes » commit 89cd877

tests: Fix POSIX sh compatibility

author Olivier Brunel
2023-01-26 15:46:02 UTC
committer Olivier Brunel
2023-01-26 15:46:02 UTC
parent c9dcfcc9c37b3e24ad9122699b1b224303842d22

tests: Fix POSIX sh compatibility

tests +2 -2

diff --git a/tests b/tests
index bd2b830..b7cc253 100755
--- a/tests
+++ b/tests
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 for test in test-*; do
-    if test "${test:${#test}-2}" == ".d"; then continue; fi
-    echo - test ${test:5}
+    if test "$(expr substr "$test" $((${#test}-1)) ${#test})" == ".d"; then continue; fi
+    echo - test $(expr substr "$test" 6 ${#test})
     ./$test
 done