about summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorDaniel Shahaf <danielsh@apache.org>2019-12-24 18:25:09 +0000
committerDaniel Shahaf <danielsh@apache.org>2019-12-26 04:21:47 +0000
commit525faae5498adb4b4f1c0f4657b9ef71fc31c4d6 (patch)
tree296ad1d6ff074c755bce6feff6582dcae5143505 /Test
parent8e0253af022abe9f9225352aae1088d6621a81ab (diff)
downloadzsh-525faae5498adb4b4f1c0f4657b9ef71fc31c4d6.tar.gz
zsh-525faae5498adb4b4f1c0f4657b9ef71fc31c4d6.tar.xz
zsh-525faae5498adb4b4f1c0f4657b9ef71fc31c4d6.zip
45137: zformat: Allow the specifying minimum width and a dot with an empty maximum width.
Before this commit, format specs such as '%5.s' would be printed
literally.  Now, they are treated as equivalent to '%5s'.

The '.' character is not allowed to be used in specs, so there is no
incompatibility.
Diffstat (limited to 'Test')
-rw-r--r--Test/V13zformat.ztst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Test/V13zformat.ztst b/Test/V13zformat.ztst
index d8de2bb04..982866e13 100644
--- a/Test/V13zformat.ztst
+++ b/Test/V13zformat.ztst
@@ -17,12 +17,14 @@
  zformat_and_print_s '%s'   foo
  zformat_and_print_s '%5s'  min
  zformat_and_print_s '%-5s' neg
+ zformat_and_print_s '%5.s' empty
  zformat_and_print_s '%.5s' max
  zformat_and_print_s '%.5s' truncated
 0:basic zformat test
 >'foo'
 >'min  '
 >'  neg'
+>'empty'
 >'max'
 >'trunc'