citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

commit 47d11bd06daf8c80161e4d03ab36dc58faae82c3
parent 4a13aa7206b62139be01995c98f3982353a0db45
Author: Kyle Milz <kyle@0x30.net>
Date:   Fri, 13 Jan 2017 19:40:49 -0700

t: add new test for milliseconds spent log line

Diffstat:
At/inst_millis.t | 25+++++++++++++++++++++++++
1 file changed, 25 insertions(+), 0 deletions(-)

diff --git a/t/inst_millis.t b/t/inst_millis.t @@ -0,0 +1,25 @@ +# +# The milliseconds spent processing line is always regex'ed out in other tests. +# Do the opposite here and make sure it's there. +# +use strict; +use warnings; + +use t::utils; +plan tests => 3; + + +my $inst = Test::Cmd->new( prog => 'citrun_inst', workdir => '' ); + +$inst->write( 'main.c', <<EOF ); +int main(void) +{ + return 0; +} +EOF + +$inst->run( args => '-c main.c', chdir => $inst->curdir ); + +like( $inst->stdout, qr/Milliseconds spent rewriting/, 'is milliseconds in citrun.log' ); +is( $inst->stderr, '', 'is citrun_inst stderr silent' ); +is( $? >> 8, 0, 'is citrun_inst exit code 0' );