Skip to content

Instantly share code, notes, and snippets.

@hisaichi5518
Created March 30, 2011 02:46
Show Gist options
  • Save hisaichi5518/893766 to your computer and use it in GitHub Desktop.
Save hisaichi5518/893766 to your computer and use it in GitHub Desktop.
わけがわからないよ。
use strict;
use warnings;
use Test::More;
use IO::ScalarArray;
use ExtUtils::MakeMaker qw(prompt);
{
my $stdin = IO::ScalarArray->new(["hoge\n"]);
local *STDIN = *$stdin;
my $hoge = prompt("set: ", 1);
ok $hoge;
}
done_testing;
__END__
=pod
t/hoge.t ....................... Failed 1/1 subtests
t/hoge.t (Wstat: 0 Tests: 0 Failed: 0)
Parse errors: Bad plan. You planned 1 tests but ran 0.
このようにmake testするとこける。perl hoge.tではこけない。
promptから、<STDIN>を使う方法に変更するとこけない。
ExtUtils::MakeMakerのバージョンは、6.56。
=cut
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment