1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

tests/builtin.sh: tweaks

This commit is contained in:
Martijn Dekker 2020-09-22 06:52:39 +02:00
parent 03cf032349
commit e149cf4fd8

View file

@ -857,10 +857,10 @@ unset foo
function test_func function test_func
{ {
readonly foo="bar" readonly foo="bar"
[[ "$foo" = "bar" ]] || err_exit "readonly variable is not assigned a value inside functions" [[ $foo = "bar" ]]
} }
test_func test_func
) ) || err_exit "readonly variable is not assigned a value inside functions"
# ====== # ======
# Test the output of nonstandard date formats with 'printf %T' # Test the output of nonstandard date formats with 'printf %T'
@ -981,7 +981,7 @@ EOF
# Builtins should handle unrecognized options correctly # Builtins should handle unrecognized options correctly
while IFS= read -r bltin <&3 while IFS= read -r bltin <&3
do case $bltin in do case $bltin in
echo | test | true | false | \[ | : | getconf | */getconf | uname | */uname) echo | test | true | false | \[ | : | getconf | */getconf | uname | */uname | login | newgrp)
continue ;; continue ;;
/*/*) expect="Usage: ${bltin##*/} " /*/*) expect="Usage: ${bltin##*/} "
actual=$({ PATH=${bltin%/*}; "${bltin##*/}" --this-option-does-not-exist; } 2>&1) ;; actual=$({ PATH=${bltin%/*}; "${bltin##*/}" --this-option-does-not-exist; } 2>&1) ;;