summaryrefslogblamecommitdiffstats
path: root/tests/ts/libsmartcols/fromfile
blob: b8297ae7deaa95006a8bf845ea7673e38ae1b0c4 (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 "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 "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