I've been trying out Test.More and it's been very easy to use so
far. Kudos, and thanks!
One problem: span tags showing up as visible text for individual
tests formatted as HTML files. I've confirmed this on Firefox (mac),
Safari, and IE6. Sample test output is below my sig; the file the
produced that output can be found here:
http://www.rectangular.com/junk/Test.Simple/tests/bad_output.html
The problem code is this line in Test.Builder:
writer('<span style="color: red; font-weight: bold">'
+ msg + '</span>')
The easiest fix is simply to omit the span tags:
writer(msg)
I tried to figure out a way to change it over to DOM manipulation
techniques, but I wasn't confident I could do that and not run into
output ordering problems with document.write.
Marvin Humphrey
Rectangular Research
http://www.rectangular.com/
1..5
ok 1 - success
not ok 2 - failure
<span style="color: red; font-weight: bold"># Failed test
</span>ok 3 - success
not ok 4 - failure
<span style="color: red; font-weight: bold"># Failed test
</span># Looks like you planned 5 tests but only ran 4.
> I've been trying out Test.More and it's been very easy to use so
> far. Kudos, and thanks!
Glad you like it, Marvin.
> The problem code is this line in Test.Builder:
>
> writer('<span style="color: red; font-weight: bold">'
> + msg + '</span>')
>
> The easiest fix is simply to omit the span tags:
>
> writer(msg)
Yes, but then you don't get the highlighting. I'm sure this can be
done with DOM manipulation, though. Anyone game to do it?
Best,
David
>> The problem code is this line in Test.Builder:
>>
>> writer('<span style="color: red; font-weight: bold">'
>> + msg + '</span>')
>>
>> The easiest fix is simply to omit the span tags:
>>
>> writer(msg)
>
> Yes, but then you don't get the highlighting. I'm sure this can be
> done with DOM manipulation, though. Anyone game to do it?
I'm game. I think I can come up with something that's internally
consistent and passes all your tests. I just need to know all the
possible scenarios we need to support. Can a test file do its own
document.write("ok 20\n") ? What else?
> I'm game. I think I can come up with something that's internally
> consistent and passes all your tests.
That'd be awesome, Marvin, thanks!
> I just need to know all the
> possible scenarios we need to support. Can a test file do its own
> document.write("ok 20\n") ? What else?
Don't know, it has been so long. I think I covered a fair amount of
stuff in the tests, though.
Note that you can grab it from svn here:
https://svn.openjsan.org:81/users/theory/Test.Simple/trunk
Best,
David