{ "maxout", 0, 0, 'm' },
{ "column", 1, 0, 'c' },
{ "nlines", 1, 0, 'n' },
+ { "width", 1, 0, 'w' },
{ NULL, 0, 0, 0 },
};
if (!tb)
err(EXIT_FAILURE, "failed to create output table");
- while((c = getopt_long(argc, argv, "c:mn:", longopts, NULL)) != -1) {
+ while((c = getopt_long(argc, argv, "c:mn:w:", longopts, NULL)) != -1) {
switch(c) {
case 'c': /* add column from file */
{
case 'n':
nlines = strtou32_or_err(optarg, "failed to parse number of lines");
break;
+ case 'w':
+ scols_table_set_termforce(tb, SCOLS_TERMFORCE_ALWAYS);
+ scols_table_set_termwidth(tb, strtou32_or_err(optarg, "failed to parse terminal width"));
+ break;
default:
err(EXIT_FAILURE, "%s [-r|--random]\n", program_invocation_short_name);
}
>> $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 \