summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak2018-06-04 15:27:54 +0200
committerKarel Zak2018-06-04 15:27:54 +0200
commit641af90dce51926d0fdb6f3635296a9a12d986b6 (patch)
treeb6cd639e697d691530557ce45ae66c231859a9ac
parentlibsmartcols: don't print empty column (diff)
downloadkernel-qcow2-util-linux-641af90dce51926d0fdb6f3635296a9a12d986b6.tar.gz
kernel-qcow2-util-linux-641af90dce51926d0fdb6f3635296a9a12d986b6.tar.xz
kernel-qcow2-util-linux-641af90dce51926d0fdb6f3635296a9a12d986b6.zip
tests: add empty column test
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r--tests/expected/column/table-empty-column1
-rwxr-xr-xtests/ts/column/table4
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/expected/column/table-empty-column b/tests/expected/column/table-empty-column
new file mode 100644
index 000000000..ed32da96c
--- /dev/null
+++ b/tests/expected/column/table-empty-column
@@ -0,0 +1 @@
+:a:b
diff --git a/tests/ts/column/table b/tests/ts/column/table
index 5c89d5eaf..b6dbd5d92 100755
--- a/tests/ts/column/table
+++ b/tests/ts/column/table
@@ -104,4 +104,8 @@ $TS_CMD_COLUMN --table $TS_SELF/files/mountinfo \
>> $TS_OUTPUT 2>&1
ts_finalize_subtest
+ts_init_subtest "empty-column"
+printf ':a:b\n' | $TS_CMD_COLUMN --table --separator ':' --output-separator ':' >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
+
ts_finalize