當我使用prove實用程序運行perl測試時,如果測試方法包含print未被換行符終止的語句,則失敗。 use Test::More tests=>1;
ok(foo(), "calling foo");
sub foo{
print "A";
1;
}
這導致 Bad plan. You planned 1 tests but ran 0.
如果我追加一個新
我正在以下回溯當我嘗試prove factorial: Cannot detect source of 'factorial'! at /usr/share/perl/5.18/TAP/Parser/IteratorFactory.pm line 263.
TAP::Parser::IteratorFactory::detect_source('TAP::Parser::Iterator