commit 315f51e9ef7ed3abbf51273a489c56e451868672 from: Sven M. Hallberg date: Sun Jul 13 07:56:48 2025 UTC change test suite pattern to *.ts commit - 909825343bd0a4b5ad4580a687a43abf6989761a commit + 315f51e9ef7ed3abbf51273a489c56e451868672 blob - 7eb267c9622bba9d8ab2a38b7c7d1caca676d9bc blob + 6412d3ac001eec975c236cf75e58896b406b7507 --- exercise +++ exercise @@ -10,7 +10,7 @@ package require Tcl 8.4 # config options set opts(-B) . ;# basedir set opts(-pd) {*} ;# pattern for test search directories -set opts(-ps) {*.tests} ;# pattern for test suite executable files +set opts(-ps) {*.ts} ;# pattern for test suite executable files set opts(-pt) {*.t} ;# pattern for test executable files set opts(-q) 0 ;# quiet mode blob - 88ca135f4cca04a357ad0bdb8a8aea42708a4769 blob + dede5ec1ec5c391b005de73502afead553f8ed7f --- exercise.1 +++ exercise.1 @@ -29,7 +29,7 @@ If given a file argument, it executes it as a single t To be recognized as tests, files must match the pattern .Pa *.t . To be run as test suites (see below), files must match the pattern -.Pa *.tests . +.Pa *.ts . .Pp The options are as follows: .Bl -tag -width Ds @@ -59,7 +59,7 @@ Defaults to .It Fl p Sy s= Ns Ar pattern Process (only) files matching the given pattern as test suites. Defaults to -.Sq *.tests . +.Sq *.ts . .It Fl p Sy t= Ns Ar pattern Process (only) files matching the given pattern as tests. Defaults to blob - a233dc1ec26e6a1e06280008ce4935e1ccf48ffa blob + 23086b0af7acfbf15c671d065c5a935d5aae1111 --- support/adapt-tst +++ support/adapt-tst @@ -6,7 +6,7 @@ # Usage: adapt-tst cmd [arg ...] # # Example: Given a test suite in 'foo.tst.c' that is built into an executable -# 'foo.tst', create the script 'foo.tests' containing the following: +# 'foo.tst', create the script 'foo.ts' containing the following: # # #!/bin/sh # exec ./adapt-tst ./foo.tst blob - 9790d53e7c84df2b62e136164c011d69b87f5ad8 blob + 73b6078d079f40e55f91db97ef39cf259942da86 --- tests/exercise/testsuite/inconsistent.t +++ tests/exercise/testsuite/inconsistent.t @@ -7,7 +7,7 @@ # this tests the case where run is less than the sum of ok, fail, and error. -export tst=$0.tests +export tst=$0.ts exec ./assert-exercise $0 \ 'run 1 ok 0 fail 0 error 1\n' \ "test test test\\n$tst: counters inconsistent\\nerror $tst\\n\\n" <$0.err # create the file assert-exercise will use err=`$STAT <$0.err` # stat it exec ./assert-exercise $0 \ blob - 86be25554f517b19b5ee549014db27cecaf7d474 blob + 8fcd268d75d352717cde62a8a0d36eb65e8cbe05 --- tests/exercise/testsuite.t +++ tests/exercise/testsuite.t @@ -1,11 +1,11 @@ #!/bin/sh -# if a test's filename matches *.tests its stdout should be parsed as +# if a test's filename matches *.ts its stdout should be parsed as # a summary and get integrated as a set of subtests # an exit code other than 127 should not matter # stderr should be passed through verbatim -export tst=$0.tests +export tst=$0.ts exec ./assert-exercise $0 \ 'run 6 ok 1 fail 2 error 3\n' \ "test test test\nfail $tst\n\n" <$tmp <<-"EOF" EOF chmod +x $tmp -export tst=$0.tests +export tst=$0.ts ./assert-exercise $0 \ "run 3 ok 2 fail 1 error 0\n" \ "something something unexpected\ntest_3()\tFAIL\nfail $tst\n\n" \