diff options
author | Karel Zak | 2019-07-23 16:26:48 +0200 |
---|---|---|
committer | Karel Zak | 2019-07-23 16:26:48 +0200 |
commit | fc970a0947469b2a7fe80af704e9fca307116c0f (patch) | |
tree | afa372d528ac71569ad5b77c6024cd172ba64e41 /tests/ts | |
parent | libsmartcols: cleanup and extend padding functionality (diff) | |
download | kernel-qcow2-util-linux-fc970a0947469b2a7fe80af704e9fca307116c0f.tar.gz kernel-qcow2-util-linux-fc970a0947469b2a7fe80af704e9fca307116c0f.tar.xz kernel-qcow2-util-linux-fc970a0947469b2a7fe80af704e9fca307116c0f.zip |
tests: (libsmartcols) add padding tests
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests/ts')
-rw-r--r-- | tests/ts/libsmartcols/files/data-string-empty | 10 | ||||
-rwxr-xr-x | tests/ts/libsmartcols/fromfile | 46 |
2 files changed, 56 insertions, 0 deletions
diff --git a/tests/ts/libsmartcols/files/data-string-empty b/tests/ts/libsmartcols/files/data-string-empty new file mode 100644 index 000000000..1f8ad34e5 --- /dev/null +++ b/tests/ts/libsmartcols/files/data-string-empty @@ -0,0 +1,10 @@ +aaaa +bbb +ccccc +dddddd +ee + +gggggg +hhh +iiiiii +jj diff --git a/tests/ts/libsmartcols/fromfile b/tests/ts/libsmartcols/fromfile index 274081ea0..20994d661 100755 --- a/tests/ts/libsmartcols/fromfile +++ b/tests/ts/libsmartcols/fromfile @@ -114,6 +114,52 @@ ts_run $TESTPROG --nlines 10 --maxout --width 80\ >> $TS_OUTPUT 2>&1 ts_finalize_subtest +ts_init_subtest "padding-default" +export LIBSMARTCOLS_DEBUG_PADDING=on +ts_run $TESTPROG --nlines 10 --width 80 \ + --column $TS_SELF/files/col-name \ + --column $TS_SELF/files/col-number \ + --column $TS_SELF/files/col-string \ + --column $TS_SELF/files/col-string \ + $TS_SELF/files/data-string \ + $TS_SELF/files/data-number \ + $TS_SELF/files/data-string-empty \ + $TS_SELF/files/data-string-empty \ + >> $TS_OUTPUT 2> /dev/null +ts_finalize_subtest + +ts_init_subtest "padding-maxout" +export LIBSMARTCOLS_DEBUG_PADDING=on +ts_run $TESTPROG --nlines 10 --width 80 \ + --maxout \ + --column $TS_SELF/files/col-name \ + --column $TS_SELF/files/col-number \ + --column $TS_SELF/files/col-string \ + --column $TS_SELF/files/col-string \ + $TS_SELF/files/data-string \ + $TS_SELF/files/data-number \ + $TS_SELF/files/data-string-empty \ + $TS_SELF/files/data-string-empty \ + >> $TS_OUTPUT 2> /dev/null +ts_finalize_subtest + +ts_init_subtest "padding-minout" +export LIBSMARTCOLS_DEBUG_PADDING=on +ts_run $TESTPROG --nlines 10 --width 80 \ + --minout \ + --column $TS_SELF/files/col-name \ + --column $TS_SELF/files/col-number \ + --column $TS_SELF/files/col-string \ + --column $TS_SELF/files/col-string \ + $TS_SELF/files/data-string \ + $TS_SELF/files/data-number \ + $TS_SELF/files/data-string-empty \ + $TS_SELF/files/data-string-empty \ + >> $TS_OUTPUT 2> /dev/null +ts_finalize_subtest + +unset LIBSMARTCOLS_DEBUG_PADDING + ts_init_subtest "strictwidth" ts_run $TESTPROG --nlines 10 \ --column $TS_SELF/files/col-name \ |