partcl now runs tcltest

Will Coleda will at coleda.com
Thu Sep 25 05:49:55 UTC 2008


On Thu, Sep 25, 2008 at 12:01 AM, Will Coleda <will at coleda.com> wrote:
> With recent updates (just in the past week), partcl can now actually
> use the tcltest library that comes with tcl 8.5.4 [1]
>
> For some time, we have been limping along with partcl's hand-rolled
> Test::More analog on a slightly processed version of tcl's *.test
> files.
>
> The current version of "make spectest" is actually processing the
> _raw_ .test files from the cvs repository.[2]
>
> While tcltest doesn't generate TAP, being able to run the spec test
> using the native testing tool is a big step forward. I'm doing a test
> run now, and will followup tomorrow, when it finishes.

And here's the results of the earlier test run:

$cat docs/spectest-progress.csv
"date","revision","files","test","pass","fail","skip"
"2008-09-25 00:00",31396,38,1481,743,290,448

> Despite the caveats below, I'm pretty happy with this progress[3]:
>
> $ tclsh8.5 t_tcl/llength.test
> llength.test:   Total   6       Passed  6       Skipped 0       Failed  0
>
> $ ./tclsh t_tcl/llength.test
> 0:      Total   6       Passed  6       Skipped 0       Failed  0
> expected boolean value but got "" [4]

The output is now:

$ ./tclsh t_tcl/llength.test
llength.test:   Total   6       Passed  6       Skipped 0       Failed  0


> [1] Not exactly a pristine copy: one of the core features of tcltest
> (where should I send my output) requires some relatively advanced
> functionality - tcl's tests are not designed like perl6's to allow new
> implementations to ease into things. I've tacked on a replacement sub
> in our copy of tcltest that for now always says "just print to
> stdout". Still, that's a oneline proc body compared to the original
> 3375 lines of tcltest.tcl

Had one more of these I had to add, similar check for stderr.

> [2] Not all of them work. Also, we're not just running "all.tcl" which
> would run all the tests; we're running them individually.

38 files out of 137.

> [3] No, not that six whole tests pass. :P

s/six/743/.

> [4] Yes, there's an error, and the filename has magically integerfied.
> Shhh. Don't ruin my moment.
>

See, all better.

Hopefully a few more small tweaks will let us run more of the other 99
test files: we were passing many of those tests when they were lightly
converted, so the number of passes should hopefully go up quickly over
the next week as more functionality required by tcltest is
implemented.

-- 
Will "Coke" Coleda


More information about the parrot-dev mailing list