summaryrefslogtreecommitdiffstats
path: root/tests/018
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-06-11 07:36:02 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-06-11 07:36:02 -0700
commitf7c05ba9ec1634ec6d127e8e5b3edafc834ab2f0 (patch)
treea8d075b8534b2ebfa03ca8a121865802a9f1bc35 /tests/018
parent1a583e55bddab7b2146a7a3bfb51e7fcda87608b (diff)
downloadtxr-f7c05ba9ec1634ec6d127e8e5b3edafc834ab2f0.tar.gz
txr-f7c05ba9ec1634ec6d127e8e5b3edafc834ab2f0.tar.bz2
txr-f7c05ba9ec1634ec6d127e8e5b3edafc834ab2f0.zip
pic: allow trailing exclamation.
* share/txr/stdlib/pic.tl (expand-pic-num, expand-pic, pic): Allow ### to be followed by a single !. This is not counted toward the field width. * tests/018/format.tl: Cover with some tests. * txr.1: Doc updated.
Diffstat (limited to 'tests/018')
-rw-r--r--tests/018/format.tl5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/018/format.tl b/tests/018/format.tl
index 23f4cc63..2e7f8b26 100644
--- a/tests/018/format.tl
+++ b/tests/018/format.tl
@@ -115,6 +115,11 @@
(pic "+##!#" 123) "#####")
(mtest
+ (pic "###!" 123) "123"
+ (pic "###." 123) "123."
+ (pic "###!" 1234) "###")
+
+(mtest
(pic "X##.#Y<<<Z>>>W" 1 2 3) "X 1.0Y2 Z 3W"
(pic "~###.#~#<<<~#>>>~#" 1 2 3) "# 1.0#2 # 3#")