inst_millis.t (600B)
1 # 2 # The milliseconds spent processing line is always regex'ed out in other tests. 3 # Do the opposite here and make sure it's there. 4 # 5 use Modern::Perl; 6 use Test::Cmd; 7 use Test::More tests => 3; 8 9 10 my $inst = Test::Cmd->new( prog => 'inst/citrun_inst', workdir => '' ); 11 12 $inst->write( 'main.c', <<EOF ); 13 int main(void) 14 { 15 return 0; 16 } 17 EOF 18 19 $inst->run( args => '-c main.c', chdir => $inst->curdir ); 20 21 my $o = 'Milliseconds spent rewriting'; 22 like( $inst->stdout, qr/$o/, 'milliseconds is in citrun.log' ); 23 is( $inst->stderr, '', 'citrun_inst stderr silent' ); 24 is( $? >> 8, 0, 'citrun_inst exit code 0' );