]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: add column --table-empty-lines test
authorKarel Zak <kzak@redhat.com>
Thu, 23 Aug 2018 11:41:05 +0000 (13:41 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 23 Aug 2018 11:41:05 +0000 (13:41 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/expected/column/table-empty-lines [new file with mode: 0644]
tests/expected/column/table-noempty-lines [new file with mode: 0644]
tests/ts/column/files/table-empty-lines [new file with mode: 0644]
tests/ts/column/table

diff --git a/tests/expected/column/table-empty-lines b/tests/expected/column/table-empty-lines
new file mode 100644 (file)
index 0000000..5e8fb21
--- /dev/null
@@ -0,0 +1,6 @@
+            
+A     B     CCC
+AA    BBB   AA
+AAA   BB    C
+            
+AAAA  BBBB  CCCC
diff --git a/tests/expected/column/table-noempty-lines b/tests/expected/column/table-noempty-lines
new file mode 100644 (file)
index 0000000..6a45fee
--- /dev/null
@@ -0,0 +1,4 @@
+A     B     CCC
+AA    BBB   AA
+AAA   BB    C
+AAAA  BBBB  CCCC
diff --git a/tests/ts/column/files/table-empty-lines b/tests/ts/column/files/table-empty-lines
new file mode 100644 (file)
index 0000000..9429b4d
--- /dev/null
@@ -0,0 +1,6 @@
+
+A B CCC
+AA BBB AA
+AAA BB C
+
+AAAA BBBB CCCC
index b6dbd5d92339b22128d9da2f4ec14f513cbca1b4..bd1f16f3fff0ce2ab06ff4d8db899c1c88c68bf3 100755 (executable)
@@ -40,6 +40,14 @@ ts_init_subtest "input-separator-space"
 $TS_CMD_COLUMN --separator "$(echo -e '\t')" --table $TS_SELF/files/table-sep-space >> $TS_OUTPUT 2>&1
 ts_finalize_subtest
 
+ts_init_subtest "empty-lines"
+$TS_CMD_COLUMN --table --table-empty-lines $TS_SELF/files/table-empty-lines >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
+
+ts_init_subtest "noempty-lines"
+$TS_CMD_COLUMN --table $TS_SELF/files/table-empty-lines >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
+
 ts_init_subtest "long"
 $TS_CMD_COLUMN --table $TS_SELF/files/mountinfo >> $TS_OUTPUT 2>&1
 ts_finalize_subtest