blob: 074ebf86b23d1335360ece3f56a39a961bafb488 (
plain) (
tree)
|
|
#!/bin/bash
#
# This file is part of util-linux.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
TS_TOPDIR="${0%/*}/../.."
TS_DESC="fromfile"
. $TS_TOPDIR/functions.sh
ts_init "$*"
TESTPROG="$TS_HELPER_LIBSMARTCOLS_FROMFILE"
ts_check_test_command "$TESTPROG"
ts_init_subtest "trunc"
$TESTPROG --nlines 10 --width 40 \
--column $TS_SELF/files/col-name \
--column $TS_SELF/files/col-number \
--column $TS_SELF/files/col-trunc \
$TS_SELF/files/data-string \
$TS_SELF/files/data-number \
$TS_SELF/files/data-string-long \
>> $TS_OUTPUT 2>&1
ts_finalize_subtest
ts_init_subtest "right"
$TESTPROG --nlines 10 \
--column $TS_SELF/files/col-name \
--column $TS_SELF/files/col-number \
--column $TS_SELF/files/col-string \
$TS_SELF/files/data-string \
$TS_SELF/files/data-number \
$TS_SELF/files/data-string-long \
>> $TS_OUTPUT 2>&1
ts_finalize_subtest
ts_init_subtest "right-maxout"
$TESTPROG --nlines 10 --maxout --width 80\
--column $TS_SELF/files/col-name \
--column $TS_SELF/files/col-number \
$TS_SELF/files/data-string \
$TS_SELF/files/data-number \
>> $TS_OUTPUT 2>&1
ts_finalize_subtest
ts_init_subtest "strictwidth"
$TESTPROG --nlines 10 \
--column $TS_SELF/files/col-name \
--column $TS_SELF/files/col-strict \
--column $TS_SELF/files/col-number \
$TS_SELF/files/data-string \
$TS_SELF/files/data-number-tiny \
$TS_SELF/files/data-number \
>> $TS_OUTPUT 2>&1
ts_finalize_subtest
ts_init_subtest "noextremes"
$TESTPROG --nlines 10 --width 45 \
--column $TS_SELF/files/col-name \
--column $TS_SELF/files/col-noextremes \
--column $TS_SELF/files/col-number \
--column $TS_SELF/files/col-name \
--column $TS_SELF/files/col-number \
$TS_SELF/files/data-string \
$TS_SELF/files/data-string-extreme \
$TS_SELF/files/data-number \
$TS_SELF/files/data-string \
$TS_SELF/files/data-number \
>> $TS_OUTPUT 2>&1
ts_finalize_subtest
ts_init_subtest "hidden"
$TESTPROG --nlines 10 \
--column $TS_SELF/files/col-name \
--column $TS_SELF/files/col-hidden \
--column $TS_SELF/files/col-number \
$TS_SELF/files/data-string \
$TS_SELF/files/data-string-long \
$TS_SELF/files/data-number \
>> $TS_OUTPUT 2>&1
ts_finalize_subtest
ts_init_subtest "wrap"
$TESTPROG --nlines 10 --width 40 \
--column $TS_SELF/files/col-name \
--column $TS_SELF/files/col-number \
--column $TS_SELF/files/col-wrap \
$TS_SELF/files/data-string \
$TS_SELF/files/data-number \
$TS_SELF/files/data-string-long \
>> $TS_OUTPUT 2>&1
ts_finalize_subtest
ts_init_subtest "wrapnl"
$TESTPROG --nlines 10 \
--column $TS_SELF/files/col-name \
--column $TS_SELF/files/col-number \
--column $TS_SELF/files/col-wrapnl \
$TS_SELF/files/data-string \
$TS_SELF/files/data-number \
$TS_SELF/files/data-string-nl \
>> $TS_OUTPUT 2>&1
ts_finalize_subtest
ts_log "...done."
ts_finalize
|