aboutsummaryrefslogtreecommitdiff
path: root/src/lib9/testfmt.c
diff options
context:
space:
mode:
authorDan Cross <cross@gajendra.net>2020-01-10 14:44:21 +0000
committerDan Cross <cross@gajendra.net>2020-01-10 14:54:30 +0000
commitfa325e9b42b0bdfb48857d1958d9fb7ceac55151 (patch)
tree81d26256d152435135bcb1ae43121979a49f5f2b /src/lib9/testfmt.c
parent77a0a5b5194d4441c86de097f2aae297cb75e2c2 (diff)
downloadplan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.tar.gz
plan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.tar.bz2
plan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.zip
Trivial changes: whitespace and modes.
Remote whitespace at the ends of lines. Remove blank lines from the ends of files. Change modes on source files so that they are not executable. Signed-off-by: Dan Cross <cross@gajendra.net>
Diffstat (limited to 'src/lib9/testfmt.c')
-rw-r--r--src/lib9/testfmt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib9/testfmt.c b/src/lib9/testfmt.c
index fd2b7039..11708ba3 100644
--- a/src/lib9/testfmt.c
+++ b/src/lib9/testfmt.c
@@ -90,14 +90,14 @@ main(int argc, char **argv)
verify(smprint("%d", 23), "23");
verify(smprint("%i", 23), "23");
verify(smprint("%Zi", 1234, 23), "23");
-
+
/* ANSI and their wacky corner cases */
verify(smprint("%.0d", 0), "");
verify(smprint("%.0o", 0), "");
verify(smprint("%.0x", 0), "");
verify(smprint("%#.0o", 0), "0");
verify(smprint("%#.0x", 0), "");
-
+
/* difficult floating point tests that many libraries get wrong */
verify(smprint("%.100f", 1.0), "1.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
verify(smprint("%.100g", 1.0), "1");
@@ -112,7 +112,7 @@ main(int argc, char **argv)
verify(smprint("%3$d %4$*5$06d %2$d %1$d", 444, 333, 111, 222, 20), "111 000222 333 444");
verify(smprint("%3$hd %4$*5$06d %2$d %1$d", 444, 333, (short)111, 222, 20), "111 000222 333 444");
verify(smprint("%3$\xe2\x98\xba""d %5$06d %2$d %1$d", 444, 333, 555, 111, 222), "111 000222 333 444");
-
+
/* test %'d formats */
verify(smprint("%'d %'d %'d", 1, 2222, 33333333), "1 2,222 33,333,333");
verify(smprint("%'019d", 0), "000,000,000,000,000");