mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
tests/basic.sh: fix tests to work with xtrace (re: c5820aab
)
This commit is contained in:
parent
b1a4131123
commit
45cfecfc1e
1 changed files with 4 additions and 0 deletions
|
@ -558,6 +558,7 @@ $SHELL 2> /dev/null -c $'for i;\ndo :;done' || err_exit 'for i ; <newline> not v
|
|||
result=$(
|
||||
TIMEFORMAT=$'\%3R'
|
||||
redirect 2>&1
|
||||
set +x
|
||||
time sleep .002
|
||||
)
|
||||
case $result in
|
||||
|
@ -574,6 +575,7 @@ expect='0%'
|
|||
actual=$(
|
||||
TIMEFORMAT=$'%0S%'
|
||||
redirect 2>&1
|
||||
set +x
|
||||
time :
|
||||
)
|
||||
[[ $actual == "$expect" ]] || err_exit "'%' is not treated literally when placed after a format specifier" \
|
||||
|
@ -584,12 +586,14 @@ us=$(
|
|||
LC_ALL='C.UTF-8' # radix point '.'
|
||||
TIMEFORMAT='%1U' # catch -1.99 bug as well by getting user time
|
||||
redirect 2>&1
|
||||
set +x
|
||||
time sleep 0
|
||||
)
|
||||
eu=$(
|
||||
LC_ALL='C_EU.UTF-8' # radix point ','
|
||||
TIMEFORMAT='%1U'
|
||||
redirect 2>&1
|
||||
set +x
|
||||
time sleep 0
|
||||
)
|
||||
[[ ${us:1:1} == ${eu:1:1} ]] && err_exit "The time keyword ignores the locale's radix point (both are ${eu:1:1})"
|
||||
|
|
Loading…
Reference in a new issue