commit 87d10ca5da4278a52969926ab0c31688bac36eb4
parent 2a860de53c32b0fbf9f95e046936d48d595283d2
Author: Kyle Milz <kyle@windows.krwm.net>
Date: Sun, 1 Jan 2017 22:32:13 -0800
t: sanitize entire banner line
Diffstat:
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/t/inst_log.t b/t/inst_log.t
@@ -10,7 +10,7 @@ use Test::More tests => 3;
unified_diff; # for Test::Differences
-my $wrap = Test::Cmd->new( prog => 'src/citrun_wrap', workdir => '' );
+my $wrap = Test::Cmd->new( prog => 'src\citrun_wrap.exe', workdir => '' );
$wrap->write( 'main.c', <<EOF );
#include <stdlib.h>
@@ -40,7 +40,7 @@ $wrap->write( 'Jamfile', 'Main main : main.c ;' );
$wrap->run( args => 'jam', chdir => $wrap->curdir );
my $citrun_log_good =<<EOF ;
->> citrun_inst v0.0 ()
+>> citrun_inst
CITRUN_SHARE = ''
PATH=''
Found source file ''
@@ -59,7 +59,7 @@ Rewriting successful.
Forked compiler ''
Rewritten source compile successful
Restored ''
->> citrun_inst v0.0 ()
+>> citrun_inst
CITRUN_SHARE = ''
PATH=''
Link detected, adding '' to command line.
@@ -71,10 +71,11 @@ my $citrun_log;
$wrap->read(\$citrun_log, 'citrun.log');
$citrun_log =~ s/^.*Milliseconds spent.*\n//gm;
$citrun_log =~ s/'.*'/''/gm;
-$citrun_log =~ s/\(.*\)/\(\)/gm;
+$citrun_log =~ s/^.* citrun_inst.*\n/>> citrun_inst\n/gm;
$citrun_log =~ s/^[0-9]+: //gm;
eq_or_diff( $citrun_log, $citrun_log_good, 'is citrun.log file identical', { context => 3 } );
# Deliberately not checking $wrap->stdout here because portability.
+print $wrap->stdout;
is( $wrap->stderr, '', 'is citrun_wrap stderr silent' );
is( $? >> 8, 0, 'is citrun_wrap exit code 0' );