#!./perl -w
chdir 't' if -d 't';
}
plan tests =>
15;
# adjust also number of skipped tests !
# Runs a separate perl interpreter with the appropriate lint options
# turned on
);
}
runlint 'context',
'$foo = @bar', <<
'RESULT';
runlint 'context',
'$foo = length @bar', <<
'RESULT';
runlint 'implicit-read',
'/foo/', <<
'RESULT';
skip("Doesn't work with threaded perls",11)
runlint 'implicit-read', '1 for @ARGV', <<'RESULT', 'implicit-read in foreach';
runlint 'dollar-underscore', '$_ = 1', <<'RESULT';
runlint 'dollar-underscore', 'print', <<'RESULT', 'dollar-underscore in print';
runlint 'private-names', 'sub A::_f{};A::_f()', <<'RESULT';
runlint 'private-names', '$A::_x', <<'RESULT';
runlint 'private-names', 'sub A::_f{};A->_f()', <<'RESULT', 'private-names (method)';
runlint 'undefined-subs', 'foo()', <<'RESULT';
runlint 'regexp-variables', 'print $&', <<'RESULT';
runlint 'regexp-variables', 's/./$&/', <<'RESULT';
runlint 'bare-subs', 'sub bare(){1};$x=bare', '';
runlint 'bare-subs', 'sub bare(){1}; $x=[bare=>0]; $x=$y{bare}', <<'RESULT';
}