[PATCH 4/4] tests: column --keep-empty-lines in cols mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add intentional whitespace to the test file `onecolumn` to test that
`column` ignores it. Add empty lines to the same test file to test that
`column--keep-empty-lines` preserves them.

Signed-off-by: Lennard Hofmann <lennard.hofmann@xxxxxx>
---
 tests/expected/column/columnate-fill-cols-keep-empty | 7 +++++++
 tests/ts/column/columnate                            | 4 ++++
 tests/ts/column/files/onecolumn                      | 5 +++++
 3 files changed, 16 insertions(+)
 create mode 100644 tests/expected/column/columnate-fill-cols-keep-empty

diff --git a/tests/expected/column/columnate-fill-cols-keep-empty b/tests/expected/column/columnate-fill-cols-keep-empty
new file mode 100644
index 000000000..8cc1fdf1f
--- /dev/null
+++ b/tests/expected/column/columnate-fill-cols-keep-empty
@@ -0,0 +1,7 @@
+			FFFFFFFFFFFFFFFFFFF
+AAAAAAAAAAAAAAAAAAAA
+BBBBBBBBBBBBBBBBBBBBB
+CCCCCCCCCCCCCCCC	XXXXXXX
+			YYYYYYYYYYY
+DDDDDDDDDDDDDDDDD	ZZZZZZZZZZZ
+EEEEEEEEEEEEE
diff --git a/tests/ts/column/columnate b/tests/ts/column/columnate
index ebeb0c44f..e80f3b00d 100755
--- a/tests/ts/column/columnate
+++ b/tests/ts/column/columnate
@@ -49,4 +49,8 @@ ts_init_subtest "fill-rows-250"
 $TS_CMD_COLUMN --fillrows -c 250 $TS_SELF/files/onecolumn >> $TS_OUTPUT 2>> $TS_ERRLOG
 ts_finalize_subtest

+ts_init_subtest "fill-cols-keep-empty"
+$TS_CMD_COLUMN --keep-empty-lines -c 60 $TS_SELF/files/onecolumn >> $TS_OUTPUT 2>> $TS_ERRLOG
+ts_finalize_subtest
+
 ts_finalize
diff --git a/tests/ts/column/files/onecolumn b/tests/ts/column/files/onecolumn
index 69ec82f5d..3e579e1d4 100644
--- a/tests/ts/column/files/onecolumn
+++ b/tests/ts/column/files/onecolumn
@@ -1,9 +1,14 @@
+
 AAAAAAAAAAAAAAAAAAAA
 BBBBBBBBBBBBBBBBBBBBB
 CCCCCCCCCCCCCCCC
+
 DDDDDDDDDDDDDDDDD
 EEEEEEEEEEEEE
 FFFFFFFFFFFFFFFFFFF
+
+
 XXXXXXX
 YYYYYYYYYYY
 ZZZZZZZZZZZ
+
--
2.28.0




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux