enca icon indicating copy to clipboard operation
enca copied to clipboard

Test-suite failures due to non-portable modern-bashism

Open dmacks opened this issue 4 weeks ago • 0 comments

On macOS 26.1 (Apple's latest release), enca-1.18 builds and passes all tests but 1.21 does not. Many of them indicate a shell error, such as in test/test-lists.sh.log:

./finish.sh: line 4: conditional binary operator expected
./finish.sh: line 4: syntax error near `MSYSTEM'
./finish.sh: line 4: `if [[ -v MSYSTEM ]]; then'
FAIL test-lists.sh (exit status: 1)

OS X's /bin/sh is bash version 3.2.57, which does not support the -v test. If I patch test/*.sh to use a separately installed bash-5.2.37, 15 FAIL become PASS.

Edit: the bug was introduced in acb1490ec85d162160512cb7c7b4de6608288ebd

dmacks avatar Nov 25 '25 23:11 dmacks