The difference that is produced and correct, is the addition of:<br><br>&nbsp;TODO passed: &nbsp; 2<br><br>in the prove output (which is triggered by the correct addition of &quot;# TODO ...&quot; in the perl output).<br><br>Tye<br>
<br><div class="gmail_quote">On Mon, Dec 29, 2008 at 2:29 PM, Michael R. Wolf <span dir="ltr">&lt;<a href="mailto:MichaelRWolf@att.net">MichaelRWolf@att.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Sorry, all. &nbsp;In my attempt to keep my original posting short, I must have been too cryptic because I had already tried everything that got suggested. &nbsp;(Thanks for the replies. &nbsp;Sorry for misleading you).<br>
<br>
Let me try again.<br>
<br>
I cannot trigger the documented behavior of a TODO block within Test::More using ok(). &nbsp;To test this, I have created two files. &nbsp;Contrary to my understanding of the documentation (perldoc Test::More), I cannot get the two files to behave differently, either with perl(1) or prove(1). &nbsp;Here is a complete listing of the files, and the output.<br>

<br>
I get an &quot;ok&quot; on the second test, regardless of perl/prove or inside/outside a TODO block. &nbsp;(I *did* notice that the *comment* was different, but if it doesn&#39;t trigger a different *response* that&#39;s testable, so what?)<br>

<br>
I get a 0 return code (indicating success) in all 4 runs (2 files * 2 runs (1 each for perl(1) and prove(1)). &nbsp;I was expecting that the &quot;success&quot; in a TODO would &quot;report it as an unexpected success&quot;. &nbsp;No dice.<br>

<br>
Ideas?<br>
<br>
Is TODO broken?<br>
<br>
Has anyone really used TODO, and gotten the documented behavior? &nbsp;(I&#39;m seeming to remember a message from Schwern (a few years ago) that TODO doesn&#39;t really work.)<br>
<br>
Thanks (and again, sorry for the too-short previous posting)<br>
Michael<br>
<br>
$ nl -ba t_m_trivial.t<br>
 &nbsp; &nbsp; 1 &nbsp;#! /usr/bin/perl<br>
 &nbsp; &nbsp; 2 &nbsp;<br>
 &nbsp; &nbsp; 3 &nbsp;use Test::More tests =&gt; 2;<br>
 &nbsp; &nbsp; 4 &nbsp;<br>
 &nbsp; &nbsp; 5 &nbsp;ok(1, &#39;normal true value 1&#39;);<br>
 &nbsp; &nbsp; 6 &nbsp;<br>
 &nbsp; &nbsp; 7 &nbsp;ok(2, &#39;normal true value 2&#39;);<br>
$ nl -ba t_m_trivial_w_todo.t<br>
 &nbsp; &nbsp; 1 &nbsp;#! /usr/bin/perl<br>
 &nbsp; &nbsp; 2 &nbsp;<br>
 &nbsp; &nbsp; 3 &nbsp;use Test::More tests =&gt; 2;<br>
 &nbsp; &nbsp; 4 &nbsp;<br>
 &nbsp; &nbsp; 5 &nbsp;ok(1, &#39;normal true value 1&#39;);<br>
 &nbsp; &nbsp; 6 &nbsp;<br>
 &nbsp; &nbsp; 7 &nbsp;TODO: {<br>
 &nbsp; &nbsp; 8 &nbsp; &nbsp; &nbsp;local $TODO = &#39;understand $Test::More::TODO&#39;;<br>
 &nbsp; &nbsp; 9 &nbsp; &nbsp; &nbsp;ok(2, &#39;normal true value 2 inside a TODO block&#39;);<br>
 &nbsp; &nbsp;10 &nbsp;}<br>
$ perl t_m_trivial.t; echo $?<br>
1..2<br>
ok 1 - normal true value 1<br>
ok 2 - normal true value 2<br>
0<br>
$ prove t_m_trivial.t; echo $?<br>
t_m_trivial....ok<br>
All tests successful.<br>
Files=1, Tests=2, &nbsp;0 wallclock secs ( 0.03 usr &nbsp;0.00 sys + &nbsp;0.02 cusr &nbsp;0.00 csys = &nbsp;0.05 CPU)<br>
Result: PASS<br>
0<br>
$ perl t_m_trivial_w_todo.t; echo $?<br>
1..2<br>
ok 1 - normal true value 1<br>
ok 2 - normal true value 2 inside a TODO block # TODO understand $Test::More::TODO<br>
0<br>
$ prove t_m_trivial_w_todo.t; echo $?<br>
t_m_trivial_w_todo....ok<br>
All tests successful.<br>
<br>
Test Summary Report<br>
-------------------<br>
t_m_trivial_w_todo (Wstat: 0 Tests: 2 Failed: 0)<br>
 &nbsp;TODO passed: &nbsp; 2<br>
Files=1, Tests=2, &nbsp;0 wallclock secs ( 0.02 usr &nbsp;0.00 sys + &nbsp;0.02 cusr &nbsp;0.00 csys = &nbsp;0.04 CPU)<br>
Result: PASS<br>
0<br>
$ WTF?<br>
bash: WTF?: command not found<br>
$<br>
<br>
<br>
<br>
Michael R. Wolf<br>
 &nbsp; &nbsp;All mammals learn by playing!<br>
 &nbsp; &nbsp; &nbsp; &nbsp;<a href="mailto:MichaelRWolf@att.net" target="_blank">MichaelRWolf@att.net</a><br>
<br>
<br>
<br>
_____________________________________________________________<br>
Seattle Perl Users Group Mailing List<br>
 &nbsp; &nbsp;POST TO: <a href="mailto:spug-list@pm.org" target="_blank">spug-list@pm.org</a><br>
SUBSCRIPTION: <a href="http://mail.pm.org/mailman/listinfo/spug-list" target="_blank">http://mail.pm.org/mailman/listinfo/spug-list</a><br>
 &nbsp; MEETINGS: 3rd Tuesdays<br>
 &nbsp; WEB PAGE: <a href="http://seattleperl.org/" target="_blank">http://seattleperl.org/</a><br>
</blockquote></div><br>