Lines Matching defs:ok
7 ok($_[0]);
14 ok($_[0]);
20 sub ok {
21 my($ok, $name) = @_;
24 printf "%s %d%s\n", $ok ? "ok" : "not ok",
28 printf "# Failed test at line %d\n", (caller)[2] unless $ok;
31 return $ok;
40 ok( $result eq 'value', ":$result: eq :value:" );
41 ok( $_[0] == 0 );
45 ok( $result eq 'value', ":$result: eq :value:" );
46 ok( $_[0] == 0 );
48 $result = do{ ok 1; 'value';};
49 ok( $result eq 'value', ":$result: eq :value:" );
52 ok 1 foreach @_;
63 print DO "ok(1, 'do in scalar context') if defined wantarray && not wantarray\n";
70 print DO "ok(1, 'do in list context') if defined wantarray && wantarray\n";
77 print DO "ok(1, 'do in void context') if not defined wantarray\n";
85 ok( !$@, "do on a non-existing file, first try" );
88 ok( !$@, "do on a non-existing file, second try" );
91 ok( (!defined do 6) && $!, "'do 6' : $!" );
95 ok( $#t == 0, "empty do result value" );