summaryrefslogtreecommitdiffstats
path: root/tests/ts/libsmartcols
diff options
context:
space:
mode:
authorKarel Zak2016-09-16 13:37:08 +0200
committerKarel Zak2016-09-16 13:37:08 +0200
commit0c3e7a013149a056866817c6d17aa605253b42d2 (patch)
treef7cb68f01e8d21e803388d1f62edf2a2effad204 /tests/ts/libsmartcols
parentlibsmartcols: add JSON support to sample application (diff)
downloadkernel-qcow2-util-linux-0c3e7a013149a056866817c6d17aa605253b42d2.tar.gz
kernel-qcow2-util-linux-0c3e7a013149a056866817c6d17aa605253b42d2.tar.xz
kernel-qcow2-util-linux-0c3e7a013149a056866817c6d17aa605253b42d2.zip
tests: add libsmartcols JSON test
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests/ts/libsmartcols')
-rwxr-xr-xtests/ts/libsmartcols/fromfile45
1 files changed, 45 insertions, 0 deletions
diff --git a/tests/ts/libsmartcols/fromfile b/tests/ts/libsmartcols/fromfile
index e57e63bc0..f9c270a70 100755
--- a/tests/ts/libsmartcols/fromfile
+++ b/tests/ts/libsmartcols/fromfile
@@ -38,6 +38,51 @@ $TESTPROG --nlines 10 \
>> $TS_OUTPUT 2>&1
ts_finalize_subtest
+ts_init_subtest "tree-json"
+$TESTPROG --nlines 10 --json \
+ --tree-id-column 1 \
+ --tree-parent-column 2 \
+ --column $TS_SELF/files/col-tree \
+ --column $TS_SELF/files/col-id \
+ --column $TS_SELF/files/col-parent \
+ --column $TS_SELF/files/col-string \
+ $TS_SELF/files/data-string \
+ $TS_SELF/files/data-id \
+ $TS_SELF/files/data-parent \
+ $TS_SELF/files/data-string-long \
+ >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
+
+ts_init_subtest "tree-middle"
+$TESTPROG --nlines 10 \
+ --tree-id-column 0 \
+ --tree-parent-column 1 \
+ --column $TS_SELF/files/col-id \
+ --column $TS_SELF/files/col-parent \
+ --column $TS_SELF/files/col-tree \
+ --column $TS_SELF/files/col-string \
+ $TS_SELF/files/data-id \
+ $TS_SELF/files/data-parent \
+ $TS_SELF/files/data-string \
+ $TS_SELF/files/data-string-long \
+ >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
+
+ts_init_subtest "tree-end"
+$TESTPROG --nlines 10 \
+ --tree-id-column 0 \
+ --tree-parent-column 1 \
+ --column $TS_SELF/files/col-id \
+ --column $TS_SELF/files/col-parent \
+ --column $TS_SELF/files/col-string \
+ --column $TS_SELF/files/col-tree \
+ $TS_SELF/files/data-id \
+ $TS_SELF/files/data-parent \
+ $TS_SELF/files/data-string-long \
+ $TS_SELF/files/data-string \
+ >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
+
ts_init_subtest "trunc"
$TESTPROG --nlines 10 --width 40 \
--column $TS_SELF/files/col-name \