summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-10-18 23:11:58 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-10-18 23:11:58 -0700
commitaf23627abe262c90fe8ddbadd89e642a237e1ff8 (patch)
treec8dbf0168c95a90b729a02b5486fc7ecba074800 /tests
parentba095bbd138cefa2754e6f43f6f12a9c4c85a6d7 (diff)
downloadtxr-af23627abe262c90fe8ddbadd89e642a237e1ff8.tar.gz
txr-af23627abe262c90fe8ddbadd89e642a237e1ff8.tar.bz2
txr-af23627abe262c90fe8ddbadd89e642a237e1ff8.zip
pic: preserve decimal period in ### overflow fill.
* pic.tl (expand-pic-num): If the overflowing field specifies a decimal point other than in the rightmost position, then stick one into the fill pattern. The motivation for this is that it harmonizes with the digit separators. The new digit separator insertion logic will treat the # characters like digits, and requires the embedded decimal in order to work properly. Allowing digit separation to work in the fill pattern will make for better looking output in column displays. That's the same reason why we insert digit separators among leading zeros. * tests/018/format.tl: Overflow test cases updated in light of this requirement change. * txr.1: Documented.
Diffstat (limited to 'tests')
-rw-r--r--tests/018/format.tl8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/018/format.tl b/tests/018/format.tl
index 0496d51f..307d4d96 100644
--- a/tests/018/format.tl
+++ b/tests/018/format.tl
@@ -200,15 +200,15 @@
(pic "-0#####.##" 1234.1) " 001234.10")
(mtest
- (pic "#!#" 1234) "###"
- (pic "#!#" 123) "###"
+ (pic "#!#" 1234) "#.#"
+ (pic "#!#" 123) "#.#"
(pic "#.#" 123) "123.0")
(mtest
(pic "-##!#" 12) " 12.0"
(pic "+##!#" 12) "+12.0"
- (pic "-##!#" -123) "#####"
- (pic "+##!#" 123) "#####")
+ (pic "-##!#" -123) "###.#"
+ (pic "+##!#" 123) "###.#")
(mtest
(pic "###!" 123) "123"