Lines Matching full:should

37         is( $ret, 3, 'DB::sub() should handle scalar context' );
38 is( $callflag, 1, '... should call $DB::sub contents' );
40 is( $ret, '1 4 9', '... should handle scalar context' );
41 is( $callflag, 3, '... should pass along arguments to the sub' );
42 ok( defined($DB::ret),'$DB::ret should be defined after successful return');
44 ok( !defined($DB::ret), '... should respect void context' );
46 ok( !defined($DB::ret), '... should return undef for DESTROY()' );
52 'DB::DB() should return undef if $DB::ready is false');
53 is( DB::catch(), 1, 'DB::catch() should work' );
54 is( DB->skippkg('foo'), 1, 'DB->skippkg() should push args' );
58 ::ok( ! defined DB::DB(), 'DB::DB() should skip skippable packages' );
61 is( $DB::filename, $0, '... should set $DB::filename' );
62 is( $DB::lineno, __LINE__ - 4, '... should set $DB::lineno' );
75 is( "$@$!$,$/$\$^W", "1\n0", 'DB::save() should reset punctuation vars' );
82 ok( $DB::signal, 'DB::catch() should set $DB::signal' );
88 'DB::_clientname should return refname');
90 'DB::_clientname should not return non refname');
96 is( $DB::single, 2, 'DB->next() should set $DB::single to 2' );
98 is( $DB::single, 1, 'DB->step() should set $DB::single to 1' );
108 is( $fdb->{tbreak}, 2, 'DB::cont() should set tbreak in object' );
109 is( $DB::single, 0, '... should set $DB::single to 0' );
118 is( $DB::single, 0, 'DB::ret() should set $DB::single to 0' );
127 like( $ret[0], qr/file.+\Q$0\E/, 'DB::backtrace() should report current file');
128 like( $ret[0], qr/line $line/, '... should report calling line number' );
129 like( $ret[0], qr/eval\Q {...}/, '... should catch eval BLOCK' );
132 is( scalar @ret, 1, '... should report from provided stack frame number' );
134 '... should find eval STRING construct');
137 '... should respect context of calling construct');
142 is( scalar @ret, 1, '... should end loop if $DB::signal is true' );
158 ok( $DB::trace, 'DB::trace_toggle() should toggle $DB::trace' );
160 ok( !$DB::trace, '... should toggle $DB::trace (back)' );
167 is( $subs, 0, 'DB::subs() should return keys of %DB::subs' );
172 is( scalar @subs, 2, '... should report only for requested subs' );
183 is( scalar @ret, 2, 'DB::filesubs() should use $DB::filename with no args');
185 is( scalar @ret, 2, '... should pick up subs in proper file' );
187 is( scalar @ret, 3, '... should use argument to find subs' );
189 is( scalar @ret, 3, '... should pick up subs in proper file with argument');
196 is( $dbf, $main, 'DB::files() should pick up filenames from %main::' );
202 is( DB->lines->[0], 'foo', 'DB::lines() should return ref to @DB::dbline' );
209 'DB::loadfile() should not find unloaded file' );
215 like( $db, qr!$file\z!, '... should find loaded file from partial name');
218 '... should set *DB::dbline to associated glob');
219 is( $DB::filename, $db, '... should set $DB::filename to file name' );
238 is( scalar keys %ret, 3, 'DB::lineevents() should pick up defined lines' );
241 is( join(' ', @{ $ret{1} }), 'two foo bar', '... should stash data in hash');
262 is( $DB::dbline{1}, "foo\0", 'DB::set_break() should set break condition' );
267 '... should use $DB::lineno without specified line' );
270 is( $DB::dbline{4}, "1\0abc", '... should use default condition if needed');
277 '... should use _find_subline() to resolve subname' );
281 like( $db->{output}, qr/2 not break/, '... should respect @DB::dbline' );
284 like( $db->{output}, qr/not found/, '... should warn on unfound sub' );
293 is( $DB::dbline{1}, ';9', 'DB::set_tbreak() should set tbreak condition' );
300 '... should use _find_subline() to resolve subname' );
304 like( $db->{output}, qr/2 not break/, '... should respect @DB::dbline' );
307 like( $db->{output}, qr/not found/, '... should warn on unfound sub' );
325 'DB::_find_subline() should find fully qualified sub' );
326 is( DB::_find_subline("TEST'foo"), 11, '... should handle old package sep');
328 '... should resolve unqualified package name to main::' );
332 '... should resolve unqualified name with $DB::package, if defined' );
337 '... should increment past lines with no events' );
340 '... should not find nonexistent sub' );
355 is( scalar keys %DB::dbline, 3, 'DB::clr_breaks() should clear breaks' );
356 ok( ! exists($DB::dbline{1}), '... should delete empty actions' );
357 is( $DB::dbline{3}, "\0\0\0abc", '... should remove break, leaving action');
358 is( $DB::dbline{4}, "\0\0\0abc", '... should not remove set actions' );
371 '... should find lines via _find_subline()' );
376 '... should output warning if sub cannot be found');
384 'Relying on @DB::dbline in DB::clr_breaks() should clear breaks' );
385 ok( ! exists($DB::dbline{1}), '... should delete empty actions' );
386 is( $DB::dbline{3}, "\0\0\0abc", '... should remove break, leaving action');
387 is( $DB::dbline{4}, "\0\0\0abc", '... should not remove set actions' );
389 '... should only go to last index of @DB::dbline' );
404 'DB::set_action() should replace existing action' );
406 is( $DB::dbline{3}, "\0", '... should set new action' );
411 '... should output warning if sub cannot be found');
415 '... should warn if line cannot be actionivated' );
433 is( scalar keys %DB::dbline, 2, 'DB::clr_actions() should clear actions' );
434 ok( ! exists($DB::dbline{1}), '... should delete empty actions' );
435 is( $DB::dbline{3}, "123", '... should remove action, leaving break');
436 is( $DB::dbline{4}, "abc\0", '... should not remove set breaks' );
448 is( $DB::dbline{3}, "123", '... should find lines via _find_subline()' );
453 '... should output warning if sub cannot be found');
461 'Relying on @DB::dbline in DB::clr_actions() should clear actions' );
462 ok( ! exists($DB::dbline{1}), '... should delete empty actions' );
463 is( $DB::dbline{3}, "123", '... should remove action, leaving break');
464 is( $DB::dbline{4}, "abc\0", '... should not remove set breaks' );
466 '... should only go to last index of @DB::dbline' );
471 'DB::prestop() should return undef for undef value' );
473 is( DB::prestop('test'), 897, '... should return value when set' );
477 'DB::prestop() should return undef for undef value' );
479 is( DB::poststop('tset'), 987, '... should return value when set' );
483 'DB::evalcode() should return undef for undef value' );
486 is( DB::evalcode('foo'), 'bar', '... should return value when set' );
489 ok( DB::register( FakeDB->new() ), 'DB::register() should work' );
494 'DB::_outputall() should call output(@_) on all clients' );
498 ok( defined &{ "DB::$method" }, "DB::$method() should be defined" );