diff options
| author | dana <dana@dana.is> | 2018-06-20 17:29:56 -0500 |
|---|---|---|
| committer | dana <dana@dana.is> | 2018-06-20 17:29:56 -0500 |
| commit | 394f3a47e464b67b17e2cb7166df066829250e88 (patch) | |
| tree | 0fe4262c7857d546878f64b53fc2813e6f59296b /Test/D01prompt.ztst | |
| parent | 43077: Fix shift builtin status. (diff) | |
| download | zsh-394f3a47e464b67b17e2cb7166df066829250e88.tar zsh-394f3a47e464b67b17e2cb7166df066829250e88.tar.gz zsh-394f3a47e464b67b17e2cb7166df066829250e88.tar.bz2 zsh-394f3a47e464b67b17e2cb7166df066829250e88.tar.lz zsh-394f3a47e464b67b17e2cb7166df066829250e88.tar.xz zsh-394f3a47e464b67b17e2cb7166df066829250e88.tar.zst zsh-394f3a47e464b67b17e2cb7166df066829250e88.zip | |
43075: Support nanosecond-precision time formatting
* Teach ztrftime() %9. and %N for nanoseconds
* Update prompt expansion to pass sub-second times for time formatting
* Update zsh/stat to pass sub-second times for atime/mtime/ctime
Patch heavily based on Oliver's earlier work @ workers/24059
Diffstat (limited to 'Test/D01prompt.ztst')
| -rw-r--r-- | Test/D01prompt.ztst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Test/D01prompt.ztst b/Test/D01prompt.ztst index 11f18dc71..56b7c294a 100644 --- a/Test/D01prompt.ztst +++ b/Test/D01prompt.ztst @@ -108,6 +108,14 @@ if (( $date2[7,8] != $date3[1,2] )); then print "Years do not agree in $date2, $date3" fi + # These are somewhat questionable, but... + ns=( ${="$(print -P '%D{%9.} %D{%N}')"} ) + if [[ $ns[1] != [0-9](#c9) ]] || [[ $ns[2] != [0-9](#c9) ]]; then + print "Nanosecond lengths/formats are not as expected in $ns[1], $ns[2]" + fi + if (( ($ns2[2] - $ns[1]) > 5000000 )); then + print "Nanoseconds differ too much in $ns[1], $ns[2]" + fi 0:Dates produced by prompt escapes mkdir foo |
