Workaround mksh expanding ~ even when it's not the first char in a word.

This commit is contained in:
Rob Landley 2025-01-10 11:06:25 -06:00
parent a617454a04
commit c914983e3a

View File

@ -136,9 +136,9 @@ testing ">1" 'test abc \> def || echo yes' "yes\n" "" ""
testing ">2" 'test def \> abc && echo yes' "yes\n" "" ""
# bash only has this for [[ ]] but extra tests to _exclude_ silly...
toyonly testcmd "=~" 'abc =~ a.c && echo yes' "yes\n" "" ""
toyonly testcmd "=~ fail" 'abc =~ d.c; echo $?' '1\n' "" ""
toyonly testcmd "=~ zero length match" 'abc =~ "1*" && echo yes' 'yes\n' '' ''
toyonly testcmd "=~" 'abc '=~' a.c && echo yes' "yes\n" "" ""
toyonly testcmd "=~ fail" 'abc '=~' d.c; echo $?' '1\n' "" ""
toyonly testcmd "=~ zero length match" 'abc '=~' "1*" && echo yes' 'yes\n' '' ''
# test ! = -o a
# test ! \( = -o a \)