diff options
author | Karel Zak | 2017-04-11 13:49:36 +0200 |
---|---|---|
committer | Karel Zak | 2017-05-02 12:18:00 +0200 |
commit | 1c9de9dbc891f3cae8bfc56e3c46d6f852207923 (patch) | |
tree | cd249b5b4ffe0f83300aa9abe75777f5ac0c4d81 /tests/ts/column/table | |
parent | libsmartcols: add debug mesg to see width change (diff) | |
download | kernel-qcow2-util-linux-1c9de9dbc891f3cae8bfc56e3c46d6f852207923.tar.gz kernel-qcow2-util-linux-1c9de9dbc891f3cae8bfc56e3c46d6f852207923.tar.xz kernel-qcow2-util-linux-1c9de9dbc891f3cae8bfc56e3c46d6f852207923.zip |
tests: add tests for new column features
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests/ts/column/table')
-rwxr-xr-x | tests/ts/column/table | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/tests/ts/column/table b/tests/ts/column/table index c977b96e2..f11c1d794 100755 --- a/tests/ts/column/table +++ b/tests/ts/column/table @@ -36,4 +36,69 @@ ts_init_subtest "input-separator" $TS_CMD_COLUMN --separator ',' --table $TS_SELF/files/table-sep >> $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 + +ts_init_subtest "hide" +$TS_CMD_COLUMN --table $TS_SELF/files/mountinfo \ + --table-hide 1,2,3,4,7,8 >> $TS_OUTPUT 2>&1 +ts_finalize_subtest + +ts_init_subtest "headers" +$TS_CMD_COLUMN --table $TS_SELF/files/mountinfo \ + --table-columns ID,PARENT,MAJMIN,ROOT,TARGET,VFS-OPTS,PROP,SEP,TYPE,SOURCE,FS-OPTS \ + --table-hide SEP,ID,PARENT,ROOT \ + >> $TS_OUTPUT 2>&1 +ts_finalize_subtest + +ts_init_subtest "truncate" +$TS_CMD_COLUMN --table $TS_SELF/files/mountinfo \ + --table-columns ID,PARENT,MAJMIN,ROOT,TARGET,VFS-OPTS,PROP,SEP,TYPE,SOURCE,FS-OPTS \ + --table-hide SEP,ID,PARENT,ROOT \ + --table-truncate VFS-OPTS,FS-OPTS \ + --output-width 80 \ + >> $TS_OUTPUT 2>&1 +ts_finalize_subtest + +ts_init_subtest "right" +$TS_CMD_COLUMN --table $TS_SELF/files/mountinfo \ + --table-columns ID,PARENT,MAJMIN,ROOT,TARGET,VFS-OPTS,PROP,SEP,TYPE,SOURCE,FS-OPTS \ + --table-hide SEP,ID,PARENT,ROOT,VFS-OPTS,FS-OPTS,PROP \ + --table-right SOURCE,TYPE \ + --output-width 80 \ + >> $TS_OUTPUT 2>&1 +ts_finalize_subtest + +ts_init_subtest "wrap" +$TS_CMD_COLUMN --table $TS_SELF/files/mountinfo \ + --table-columns ID,PARENT,MAJMIN,ROOT,TARGET,VFS-OPTS,PROP,SEP,TYPE,SOURCE,FS-OPTS \ + --table-hide=SEP,ID,PARENT,ROOT,VFS-OPTS,PROP \ + --table-wrap FS-OPTS \ + --output-width 110 \ + >> $TS_OUTPUT 2>&1 +ts_finalize_subtest + +ts_init_subtest "order" +$TS_CMD_COLUMN --table $TS_SELF/files/mountinfo \ + --table-columns ID,PARENT,MAJMIN,ROOT,TARGET,VFS-OPTS,PROP,SEP,TYPE,SOURCE,FS-OPTS \ + --table-hide=SEP,ID,PARENT,ROOT,PROP,FS-OPTS,MAJMIN \ + --table-order TARGET,SOURCE,TYPE,VFS-OPTS \ + --output-width 110 \ + >> $TS_OUTPUT 2>&1 +ts_finalize_subtest + +ts_init_subtest "tree" +$TS_CMD_COLUMN --table $TS_SELF/files/mountinfo \ + --table-columns ID,PARENT,MAJMIN,ROOT,TARGET,VFS-OPTS,PROP,SEP,TYPE,SOURCE,FS-OPTS \ + --table-hide=SEP,ID,PARENT,ROOT,PROP,FS-OPTS,MAJMIN \ + --table-order TARGET,SOURCE,TYPE,VFS-OPTS \ + --tree TARGET \ + --tree-id ID \ + --tree-parent PARENT \ + --output-width 110 \ + >> $TS_OUTPUT 2>&1 +ts_finalize_subtest + ts_finalize |