Changeset 9693
- Timestamp:
- 12/14/09 03:41:38 (2 years ago)
- Location:
- trunk/Debug-Client
- Files:
-
- 8 edited
-
Changes (modified) (1 diff)
-
t/02-sub-step_out.t (modified) (3 diffs)
-
t/02-sub-step_over.t (modified) (2 diffs)
-
t/02-sub.t (modified) (6 diffs)
-
t/04-run_to_line.t (modified) (1 diff)
-
t/04-run_to_sub.t (modified) (1 diff)
-
t/05-execute.t (modified) (3 diffs)
-
t/eg/02-sub.pl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Debug-Client/Changes
r9687 r9693 1 v0.07 2 Added more test. 3 1 4 v0.06 2009.12.14 2 5 Prompt is now the first return paramter -
trunk/Debug-Client/t/02-sub-step_out.t
r9680 r9693 12 12 my $PROMPT = re('\d+'); 13 13 14 plan(tests => 1 1);14 plan(tests => 16); 15 15 16 16 my $debugger = start_debugger(); … … 47 47 { 48 48 my @out = $debugger->step_in; 49 cmp_deeply(\@out, [$PROMPT, 'main::f', 't/eg/02-sub.pl', 1 3, ' my ($q, $w) = @_;'], 'line 13');49 cmp_deeply(\@out, [$PROMPT, 'main::f', 't/eg/02-sub.pl', 16, ' my ($q, $w) = @_;'], 'line 16'); 50 50 } 51 51 52 52 { 53 53 my @out = $debugger->step_in; 54 cmp_deeply(\@out, [$PROMPT, 'main::f', 't/eg/02-sub.pl', 1 4, ' my $multi = $q * $w;'], 'line 14')54 cmp_deeply(\@out, [$PROMPT, 'main::f', 't/eg/02-sub.pl', 17, ' my $multi = $q * $w;'], 'line 17') 55 55 or diag($debugger->buffer); 56 56 } … … 72 72 73 73 { 74 my $out = $debugger->step_in; 75 is($out, "main::(t/eg/02-sub.pl:10):\tmy \$t = f(19, 23);\n DB<3> ", 'out'); 76 } 77 78 { 79 my @out = $debugger->step_in; 80 cmp_deeply(\@out, [$PROMPT, 'main::f', 't/eg/02-sub.pl', 16, ' my ($q, $w) = @_;'], 'line 17') 81 or diag($debugger->buffer); 82 } 83 84 { 85 my $out = $debugger->step_in; 86 is($out, "main::f(t/eg/02-sub.pl:17):\t my \$multi = \$q * \$w;\n DB<3> ", 'out'); 87 } 88 89 { 90 my $out = $debugger->step_out; 91 is($out, "scalar context return from main::f: 437\nmain::(t/eg/02-sub.pl:11):\t\$t++;\n DB<3> ", 'out'); 92 } 93 94 { 95 my $out = $debugger->step_in; 96 is($out, "main::(t/eg/02-sub.pl:12):\t\$z++;\n DB<3> ", 'out'); 97 } 98 99 { 74 100 # Debugged program terminated. Use q to quit or R to restart, 75 101 # use o inhibit_exit to avoid stopping after program termination, -
trunk/Debug-Client/t/02-sub-step_over.t
r9686 r9693 12 12 my $PROMPT = re('\d+'); 13 13 14 plan(tests => 9);14 plan(tests => 12); 15 15 16 16 my $debugger = start_debugger(); … … 63 63 } 64 64 65 66 { 67 my $out = $debugger->step_over; 68 is($out, "main::(t/eg/02-sub.pl:10):\tmy \$t = f(19, 23);\n DB<3> ", 'step over on simple statement'); 69 } 70 71 { 72 my $out = $debugger->step_over; 73 is($out, "main::(t/eg/02-sub.pl:11):\t\$t++;\n DB<3> ", 'step over in scalar context'); 74 } 75 76 { 77 my @out = $debugger->step_over; 78 cmp_deeply(\@out, [$PROMPT, 'main::', 't/eg/02-sub.pl', 12, '$z++;'], 'line 12') 79 or diag($debugger->buffer); 80 } 81 65 82 { 66 83 # Debugged program terminated. Use q to quit or R to restart, -
trunk/Debug-Client/t/02-sub.t
r9680 r9693 12 12 my $PROMPT = re('\d+'); 13 13 14 plan(tests => 13);14 plan(tests => 20); 15 15 16 16 my $debugger = start_debugger(); … … 50 50 { 51 51 my @out = $debugger->step_in; 52 cmp_deeply(\@out, [$PROMPT, 'main::f', 't/eg/02-sub.pl', 1 3, ' my ($q, $w) = @_;'], 'line 13')52 cmp_deeply(\@out, [$PROMPT, 'main::f', 't/eg/02-sub.pl', 16, ' my ($q, $w) = @_;'], 'line 16') 53 53 or diag($debugger->buffer); 54 54 } … … 56 56 { 57 57 my @out = $debugger->step_in; 58 cmp_deeply(\@out, [$PROMPT, 'main::f', 't/eg/02-sub.pl', 1 4, ' my $multi = $q * $w;'], 'line 14')58 cmp_deeply(\@out, [$PROMPT, 'main::f', 't/eg/02-sub.pl', 17, ' my $multi = $q * $w;'], 'line 17') 59 59 or diag($debugger->buffer); 60 60 } … … 62 62 { 63 63 my @out = $debugger->step_in; 64 cmp_deeply(\@out, [$PROMPT, 'main::f', 't/eg/02-sub.pl', 1 5, ' my $add = $q + $w;'], 'line 15')64 cmp_deeply(\@out, [$PROMPT, 'main::f', 't/eg/02-sub.pl', 18, ' my $add = $q + $w;'], 'line 18') 65 65 or diag($debugger->buffer); 66 66 } … … 68 68 { 69 69 my @out = $debugger->step_in; 70 cmp_deeply(\@out, [$PROMPT, 'main::f', 't/eg/02-sub.pl', 1 6, ' return $multi;'], 'line 16')70 cmp_deeply(\@out, [$PROMPT, 'main::f', 't/eg/02-sub.pl', 19, ' return $multi;'], 'line 19') 71 71 or diag($debugger->buffer); 72 72 } … … 90 90 91 91 { 92 my $out = $debugger->step_in; 93 is($out, "main::(t/eg/02-sub.pl:10):\tmy \$t = f(19, 23);\n DB<3> ", 'out'); 94 } 95 96 { 97 my $out = $debugger->step_in; 98 is($out, "main::f(t/eg/02-sub.pl:16):\t my (\$q, \$w) = \@_;\n DB<3> ", 'out'); 99 } 100 101 { 102 my $out = $debugger->step_in; 103 is($out, "main::f(t/eg/02-sub.pl:17):\t my \$multi = \$q * \$w;\n DB<3> ", 'out'); 104 } 105 106 { 107 my $out = $debugger->step_in; 108 is($out, "main::f(t/eg/02-sub.pl:18):\t my \$add = \$q + \$w;\n DB<3> ", 'out'); 109 } 110 111 112 { 113 my $out = $debugger->step_in; 114 is($out, "main::f(t/eg/02-sub.pl:19):\t return \$multi;\n DB<3> ", 'out'); 115 } 116 117 { 118 my $out = $debugger->step_in; 119 is($out, "main::(t/eg/02-sub.pl:11):\t\$t++;\n DB<3> ", 'out'); 120 } 121 122 { 123 my $out = $debugger->step_in; 124 is($out, "main::(t/eg/02-sub.pl:12):\t\$z++;\n DB<3> ", 'out'); 125 } 126 127 128 { 92 129 # Debugged program terminated. Use q to quit or R to restart, 93 130 # use o inhibit_exit to avoid stopping after program termination, -
trunk/Debug-Client/t/04-run_to_line.t
r9680 r9693 40 40 41 41 { 42 my @out = $debugger->run(1 4);43 cmp_deeply(\@out, [$PROMPT, 'main::f', 't/eg/02-sub.pl', 1 4, ' my $multi = $q * $w;'], 'line 14')42 my @out = $debugger->run(17); 43 cmp_deeply(\@out, [$PROMPT, 'main::f', 't/eg/02-sub.pl', 17, ' my $multi = $q * $w;'], 'line 17') 44 44 or diag($debugger->buffer); 45 45 } -
trunk/Debug-Client/t/04-run_to_sub.t
r9680 r9693 41 41 { 42 42 my @out = $debugger->run('f'); 43 cmp_deeply(\@out, [$PROMPT, 'main::f', 't/eg/02-sub.pl', 1 3, ' my ($q, $w) = @_;'], 'line 13')43 cmp_deeply(\@out, [$PROMPT, 'main::f', 't/eg/02-sub.pl', 16, ' my ($q, $w) = @_;'], 'line 16') 44 44 or diag($debugger->buffer); 45 45 } -
trunk/Debug-Client/t/05-execute.t
r9680 r9693 14 14 our $TODO; # needed becasue Test::More is required and not used 15 15 16 plan(tests => 1 3);16 plan(tests => 14); 17 17 18 18 my $debugger = start_debugger(); … … 82 82 83 83 { 84 my @out = $debugger->set_breakpoint( 't/eg/02-sub.pl', 1 5);84 my @out = $debugger->set_breakpoint( 't/eg/02-sub.pl', 18 ); 85 85 cmp_deeply(\@out, [$PROMPT, ''], 'set_breakpoint') 86 86 or diag($debugger->buffer); … … 89 89 { 90 90 my @out = $debugger->run; 91 cmp_deeply(\@out, [$PROMPT, 'main::f', 't/eg/02-sub.pl', 1 5, ' my $add = $q + $w;'], 'line 15')91 cmp_deeply(\@out, [$PROMPT, 'main::f', 't/eg/02-sub.pl', 18, ' my $add = $q + $w;'], 'line 18') 92 92 or diag($debugger->buffer); 93 93 } 94 94 95 # TODO maybe check if we can remove the breakpoint 96 { 97 my @out = $debugger->run; 98 cmp_deeply(\@out, [$PROMPT, 'main::f', 't/eg/02-sub.pl', 18, ' my $add = $q + $w;'], 'line 18') 99 or diag($debugger->buffer); 100 } 95 101 96 102 { -
trunk/Debug-Client/t/eg/02-sub.pl
r9672 r9693 8 8 my $q = f($x, $y); 9 9 my $z = $x + $y; 10 my $t = f(19, 23); 11 $t++; 12 $z++; 10 13 11 14
Note: See TracChangeset
for help on using the changeset viewer.
