diff options
| -rw-r--r-- | ChangeLog | 3 | ||||
| -rw-r--r-- | Test/C02cond.ztst | 19 |
2 files changed, 17 insertions, 5 deletions
@@ -1,5 +1,8 @@ 2026-05-06 dana <dana@dana.is> + * 54484: Test/C02cond.ztst: fix -nt test on low-resolution file + systems + * 54471: Doc/Zsh/builtins.yo, Doc/Zsh/options.yo, NEWS, README, Src/builtin.c, Test/B10getopts.ztst: getopts: don't look for +o with posix_builtins, add -p diff --git a/Test/C02cond.ztst b/Test/C02cond.ztst index 3910f705f..bc565e8b6 100644 --- a/Test/C02cond.ztst +++ b/Test/C02cond.ztst @@ -142,14 +142,23 @@ # can't be bothered with -S - print -ru $ZTST_fd 'This test may take two seconds...' - touch $newnewnew - if (( isnfs )); then + zmodload -s zsh/datetime && { + t= && + strftime -s t %m%d%H%M.%S $(( EPOCHSECONDS + 2 )) && + touch -t $t -- $newnewnew && + touch -at $t -- $unmodified + } 2> /dev/null || { + print -ru $ZTST_fd 'This test will take two seconds...' && + sleep 2 && + touch -- $newnewnew && + touch -a -- $unmodified + } + if (( $? )); then + ZTST_skip='[[ -N file ]] not tested; touch failed' + elif (( isnfs )); then ZTST_skip="[[ -N file ]] not supported with NFS" elif ! zmodload -F zsh/stat b:zstat 2> /dev/null; then ZTST_skip='[[ -N file ]] not tested; zsh/stat not available' - elif ! { sleep 2; touch -a $unmodified 2> /dev/null }; then - ZTST_skip='[[ -N file ]] not tested; touch failed' elif [[ "$(zstat +atime $unmodified)" == "$(zstat +mtime $unmodified)" ]]; then ZTST_skip='[[ -N file ]] not supported on this file system' else |
