From 3f236f32cffadd94104e719c849bef84df3c8231 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Tue, 10 Sep 2019 18:30:16 +0200 Subject: [PATCH] test various formatting and options --- t/t1003-float.in | 18 +++++++++++++++++ t/t1003-float.out | 18 +++++++++++++++++ t/t1004-unicode.in | 31 +++++++++++++++++++++++++++++ t/t1004-unicode.out | 31 +++++++++++++++++++++++++++++ t/t1100-aligned.in | 7 +++++++ t/t1100-aligned.out | 7 +++++++ t/t1101-wow_much_length_-l30.in | 1 + t/t1101-wow_much_length_-l30.out | 7 +++++++ t/t1102-strip_contents_-l0.in | 1 + t/t1102-strip_contents_-l0.out | 7 +++++++ t/t1103-only_separators_-l1.in | 1 + t/t1103-only_separators_-l1.out | 7 +++++++ t/t1104-abbreviate_contents_-l5.in | 1 + t/t1104-abbreviate_contents_-l5.out | 7 +++++++ t/t1105-length_percentage_-l50%.in | 1 + t/t1105-length_percentage_-l50%.out | 7 +++++++ t/t1106-forced_length_-l-30.in | 1 + t/t1106-forced_length_-l-30.out | 7 +++++++ t/t1200-unaligned_-u.in | 1 + t/t1200-unaligned_-u.out | 7 +++++++ t/t1201-unchanged_-uw1.in | 1 + t/t1201-unchanged_-uw1.out | 7 +++++++ t/t1202-abbreviate_total_-ul8.in | 1 + t/t1202-abbreviate_total_-ul8.out | 7 +++++++ t/t1300-field_number_-f2.in | 4 ++++ t/t1300-field_number_-f2.out | 4 ++++ 26 files changed, 192 insertions(+) create mode 100644 t/t1003-float.in create mode 100644 t/t1003-float.out create mode 100644 t/t1004-unicode.in create mode 100644 t/t1004-unicode.out create mode 100644 t/t1100-aligned.in create mode 100644 t/t1100-aligned.out create mode 120000 t/t1101-wow_much_length_-l30.in create mode 100644 t/t1101-wow_much_length_-l30.out create mode 120000 t/t1102-strip_contents_-l0.in create mode 100644 t/t1102-strip_contents_-l0.out create mode 120000 t/t1103-only_separators_-l1.in create mode 100644 t/t1103-only_separators_-l1.out create mode 120000 t/t1104-abbreviate_contents_-l5.in create mode 100644 t/t1104-abbreviate_contents_-l5.out create mode 120000 t/t1105-length_percentage_-l50%.in create mode 100644 t/t1105-length_percentage_-l50%.out create mode 120000 t/t1106-forced_length_-l-30.in create mode 100644 t/t1106-forced_length_-l-30.out create mode 120000 t/t1200-unaligned_-u.in create mode 100644 t/t1200-unaligned_-u.out create mode 120000 t/t1201-unchanged_-uw1.in create mode 100644 t/t1201-unchanged_-uw1.out create mode 120000 t/t1202-abbreviate_total_-ul8.in create mode 100644 t/t1202-abbreviate_total_-ul8.out create mode 100644 t/t1300-field_number_-f2.in create mode 100644 t/t1300-field_number_-f2.out diff --git a/t/t1003-float.in b/t/t1003-float.in new file mode 100644 index 0000000..dd5ff2b --- /dev/null +++ b/t/t1003-float.in @@ -0,0 +1,18 @@ +-3 +-2.449 +-2 +-1 +0 +.0000000001 +1e-10 +-1e-2 +-1234e-99 +-1e-1234 +-1f-1234 +-0 +1.0.0 +2. ++1 +1-2 +-2.0 +--1 diff --git a/t/t1003-float.out b/t/t1003-float.out new file mode 100644 index 0000000..db8ce4f --- /dev/null +++ b/t/t1003-float.out @@ -0,0 +1,18 @@ + -3 + -2.449 -- + -2 ---- + -1 -------<- + 0 -------<--=-| +.0000000001 -------<--=-| + 1e-10 -------<--=-| + -1e-2 -------<--=-| + -1234e-99 -------<--=-| + -1e-1234 -------<--=-| + -1f-1234 -------<- + -0 -------<--=-| + 1.0.0 -------<--=-|----- + 2. -------<--=-|--------- ++1 -------<--=-| + 1-2 -------<--=-|----- + -2.0 ---- +--1 -------<--=-| diff --git a/t/t1004-unicode.in b/t/t1004-unicode.in new file mode 100644 index 0000000..1d265d1 --- /dev/null +++ b/t/t1004-unicode.in @@ -0,0 +1,31 @@ + 9324 A + 920 B + 476 C + 619 Ĉ + 2094 D + 6552 E + 1062 F + 766 G + 738 Ĝ + 371 H + 7 Ĥ + 5513 I + 1140 J + 38 Ĵ + 2558 K + 4253 L + 2183 M + 6321 N + 8110 O + 2266 P + 4387 R + 5462 S + 331 Ŝ + 3534 T +2579 U +  320 Ŭ + 1458 V +           383 Z +# 23731 whitespace +4217 … + 0 diff --git a/t/t1004-unicode.out b/t/t1004-unicode.out new file mode 100644 index 0000000..cb72b7a --- /dev/null +++ b/t/t1004-unicode.out @@ -0,0 +1,31 @@ +9324 A -<----+-=--->-------------------- + 920 B -<- + 476 C -< + 619 Ĉ -< +2094 D -<----+ +6552 E -<----+-=--->---------- +1062 F -<-- + 766 G -<- + 738 Ĝ -<- + 371 H - + 7 Ĥ +5513 I -<----+-=--->------- +1140 J -<-- + 38 Ĵ +2558 K -<----+-= +4253 L -<----+-=--->-- +2183 M -<----+- +6321 N -<----+-=--->--------- +8110 O -<----+-=--->---------------- +2266 P -<----+- +4387 R -<----+-=--->--- +5462 S -<----+-=--->------ + 331 Ŝ - +3534 T -<----+-=---> +2579 U -<----+-= + 320 Ŭ - +1458 V -<--- + 383 Z - +# 23731 whitespace +4217 … -<----+-=--->-- + 0 diff --git a/t/t1100-aligned.in b/t/t1100-aligned.in new file mode 100644 index 0000000..6fc0190 --- /dev/null +++ b/t/t1100-aligned.in @@ -0,0 +1,7 @@ +1 + 2 prepend + 3: append + 4 3 2 1 trailing space + 010 + 10. more + 5.0less diff --git a/t/t1100-aligned.out b/t/t1100-aligned.out new file mode 100644 index 0000000..83e2871 --- /dev/null +++ b/t/t1100-aligned.out @@ -0,0 +1,7 @@ + 1 - + 2 prepend -< + 3: append -< + 4 3 2 1 trailing space -<+ +010 -<+=->-- + 10. more -<+=->-- +5.0less -<+= diff --git a/t/t1101-wow_much_length_-l30.in b/t/t1101-wow_much_length_-l30.in new file mode 120000 index 0000000..f9de8c6 --- /dev/null +++ b/t/t1101-wow_much_length_-l30.in @@ -0,0 +1 @@ +t1100-aligned.in \ No newline at end of file diff --git a/t/t1101-wow_much_length_-l30.out b/t/t1101-wow_much_length_-l30.out new file mode 100644 index 0000000..83e2871 --- /dev/null +++ b/t/t1101-wow_much_length_-l30.out @@ -0,0 +1,7 @@ + 1 - + 2 prepend -< + 3: append -< + 4 3 2 1 trailing space -<+ +010 -<+=->-- + 10. more -<+=->-- +5.0less -<+= diff --git a/t/t1102-strip_contents_-l0.in b/t/t1102-strip_contents_-l0.in new file mode 120000 index 0000000..f9de8c6 --- /dev/null +++ b/t/t1102-strip_contents_-l0.in @@ -0,0 +1 @@ +t1100-aligned.in \ No newline at end of file diff --git a/t/t1102-strip_contents_-l0.out b/t/t1102-strip_contents_-l0.out new file mode 100644 index 0000000..667925c --- /dev/null +++ b/t/t1102-strip_contents_-l0.out @@ -0,0 +1,7 @@ + 1 ---- + 2 ------- + 3:---------<- + 4 ---------<---+ +010 ---------<---+---=-------->--------- + 10.---------<---+---=-------->--------- +5.0l---------<---+---= diff --git a/t/t1103-only_separators_-l1.in b/t/t1103-only_separators_-l1.in new file mode 120000 index 0000000..f9de8c6 --- /dev/null +++ b/t/t1103-only_separators_-l1.in @@ -0,0 +1 @@ +t1100-aligned.in \ No newline at end of file diff --git a/t/t1103-only_separators_-l1.out b/t/t1103-only_separators_-l1.out new file mode 100644 index 0000000..4f05457 --- /dev/null +++ b/t/t1103-only_separators_-l1.out @@ -0,0 +1,7 @@ + 1 ---- + 2 ------- + 3: ---------<- + 4 ---------<---+ +010 ---------<---+--=-------->--------- + 10. ---------<---+--=-------->--------- +5.0l ---------<---+--=- diff --git a/t/t1104-abbreviate_contents_-l5.in b/t/t1104-abbreviate_contents_-l5.in new file mode 120000 index 0000000..f9de8c6 --- /dev/null +++ b/t/t1104-abbreviate_contents_-l5.in @@ -0,0 +1 @@ +t1100-aligned.in \ No newline at end of file diff --git a/t/t1104-abbreviate_contents_-l5.out b/t/t1104-abbreviate_contents_-l5.out new file mode 100644 index 0000000..3f86a77 --- /dev/null +++ b/t/t1104-abbreviate_contents_-l5.out @@ -0,0 +1,7 @@ + 1 --- + 2 pr… ------ + 3: … --------<- + 4 … --------<--+- +010 --------<--+---=------->-------- + 10. m… --------<--+---=------->-------- +5.0less --------<--+---= diff --git a/t/t1105-length_percentage_-l50%.in b/t/t1105-length_percentage_-l50%.in new file mode 120000 index 0000000..f9de8c6 --- /dev/null +++ b/t/t1105-length_percentage_-l50%.in @@ -0,0 +1 @@ +t1100-aligned.in \ No newline at end of file diff --git a/t/t1105-length_percentage_-l50%.out b/t/t1105-length_percentage_-l50%.out new file mode 100644 index 0000000..9ff681d --- /dev/null +++ b/t/t1105-length_percentage_-l50%.out @@ -0,0 +1,7 @@ + 1 -- + 2 prepend --- + 3: append ----< + 4 3 2 1 trail… ----<+- +010 ----<+-=--->----- + 10. more ----<+-=--->----- +5.0less ----<+-=- diff --git a/t/t1106-forced_length_-l-30.in b/t/t1106-forced_length_-l-30.in new file mode 120000 index 0000000..f9de8c6 --- /dev/null +++ b/t/t1106-forced_length_-l-30.in @@ -0,0 +1 @@ +t1100-aligned.in \ No newline at end of file diff --git a/t/t1106-forced_length_-l-30.out b/t/t1106-forced_length_-l-30.out new file mode 100644 index 0000000..67e5e7b --- /dev/null +++ b/t/t1106-forced_length_-l-30.out @@ -0,0 +1,7 @@ + 1 < + 2 prepend < + 3: append <+ + 4 3 2 1 trailing space <+ +010 <+=>-- + 10. more <+=>-- +5.0less <+= diff --git a/t/t1200-unaligned_-u.in b/t/t1200-unaligned_-u.in new file mode 120000 index 0000000..f9de8c6 --- /dev/null +++ b/t/t1200-unaligned_-u.in @@ -0,0 +1 @@ +t1100-aligned.in \ No newline at end of file diff --git a/t/t1200-unaligned_-u.out b/t/t1200-unaligned_-u.out new file mode 100644 index 0000000..88e0713 --- /dev/null +++ b/t/t1200-unaligned_-u.out @@ -0,0 +1,7 @@ +1 - + 2 prepend -- + 3: append --< + 4 3 2 1 trailing space --<+ + 010 --<+=->--- + 10. more --<+=->--- + 5.0less --<+= diff --git a/t/t1201-unchanged_-uw1.in b/t/t1201-unchanged_-uw1.in new file mode 120000 index 0000000..f9de8c6 --- /dev/null +++ b/t/t1201-unchanged_-uw1.in @@ -0,0 +1 @@ +t1100-aligned.in \ No newline at end of file diff --git a/t/t1201-unchanged_-uw1.out b/t/t1201-unchanged_-uw1.out new file mode 100644 index 0000000..d8bf8d1 --- /dev/null +++ b/t/t1201-unchanged_-uw1.out @@ -0,0 +1,7 @@ +1 + 2 prepend + 3: append + 4 3 2 1 trailing space + 010 + 10. more + 5.0less diff --git a/t/t1202-abbreviate_total_-ul8.in b/t/t1202-abbreviate_total_-ul8.in new file mode 120000 index 0000000..f9de8c6 --- /dev/null +++ b/t/t1202-abbreviate_total_-ul8.in @@ -0,0 +1 @@ +t1100-aligned.in \ No newline at end of file diff --git a/t/t1202-abbreviate_total_-ul8.out b/t/t1202-abbreviate_total_-ul8.out new file mode 100644 index 0000000..bc00f50 --- /dev/null +++ b/t/t1202-abbreviate_total_-ul8.out @@ -0,0 +1,7 @@ +1 --- + 2 pre… ------- + 3: … --------<- + 4 --------<---+ + 010 --------<---+--=------->--------- + 10. … --------<---+--=------->--------- + 5.0… --------<---+--=- diff --git a/t/t1300-field_number_-f2.in b/t/t1300-field_number_-f2.in new file mode 100644 index 0000000..5e7b087 --- /dev/null +++ b/t/t1300-field_number_-f2.in @@ -0,0 +1,4 @@ +1 2 3 4 +10 20 30 40 +3 16 9 123 + 4 5 12 7 diff --git a/t/t1300-field_number_-f2.out b/t/t1300-field_number_-f2.out new file mode 100644 index 0000000..bf25b3d --- /dev/null +++ b/t/t1300-field_number_-f2.out @@ -0,0 +1,4 @@ +1 2 3 4 --- +10 20 30 40 -------<+--=------>--------- +3 16 9 123 -------< +4 5 12 7 -------<+-- -- 2.30.0