commit dfc66788b4af44513e7e29c713d5a185e5799ea0 from: Sven M. Hallberg date: Sat Jul 19 20:41:07 2025 UTC add -vv: pass tests' stdout through, quoted commit - 009c5e1eaaebd3bcd09444fa9b6ceddb1af285b5 commit + dfc66788b4af44513e7e29c713d5a185e5799ea0 blob - 52aa65a46fed30234eab7e9973a7aa75a15903e3 blob + a5cdbff16e68b449d8c11b771dfe328c5dfcc649 --- exercise +++ exercise @@ -80,6 +80,8 @@ proc execute_test {job basedir path} { set scounters [sanitize_suite_counters $out] print_progress [add_suite_counters $counters $scounters] + } elseif {$opts(-v) >= 2} { + qputs "> $out" } } @@ -464,6 +466,9 @@ proc main {argc argv} { exit 1 } } + if {$opt eq "v"} { + set arg [expr $opts(-v) + 1] ;# increment + } set opts(-$opt) $arg } set argc [llength $argv] blob - 6f441dbbea6d9f7adbd9fcaef97a4843dad662d9 blob + 8c973ee467abc39802e149a9abc5ffbc17f51472 --- exercise.1 +++ exercise.1 @@ -87,9 +87,14 @@ as test executables. Defaults to .Sq *.t . .It Fl q -Be quiet. Do not print status counters to standard output. +Be quiet. +Do not print status counters to standard output. .It Fl v -Be verbose. Print the name of each test to standard output. +Be verbose. +Print the name of each test to standard output preceded by +.Dq "> " . +If given twice, also print any test standard output +with an additional level of quoting. .El . .Ss Test Files blob - 9c7a0a4c15bf176d37410eeeaa81df06cef6ebda blob + 50021845f3755dc331e2e5b256937e228613dc42 --- tests/exercise/flag/v.t +++ tests/exercise/flag/v.t @@ -18,6 +18,14 @@ EOF exit 0 EOF +./assert-exercise $0 \ + "> $0.tst\n> > hallo welt\nrun 1 ok 1 fail 0 error 0\n" \ + '' \ + -vv < $0.ts\n> > test1\n> > test2\nrun 2 ok 2 fail 0 error 0\n" \