citrun

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

commit 94397d82fb7d2ee440bbb525c5947ea3dccb0121
parent 8d6d6fa09de6a490978fced542ca3de8186f9935
Author: Kyle Milz <kyle@0x30.net>
Date:   Wed,  4 Jan 2017 00:25:50 -0700

t: fix up wrap badarg to be more os independent

Diffstat:
Mt/wrap_badarg.t | 12+++++-------
Mwrap.sh | 4----
2 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/t/wrap_badarg.t b/t/wrap_badarg.t @@ -11,13 +11,11 @@ $wrap->run( args => '-ASD', chdir => $wrap->curdir ); my $err_good; if ($^O eq "MSWin32") { - $err_good = "'-ASD' is not recognized as an internal or external command, -operable program or batch file. -"; + $err_good = "'-ASD' is not recognized as an internal or external command"; +} else { + $err_good = '-ASD: not found'; } is( $wrap->stdout, '', 'is citrun_wrap stdout silent' ); -is( $wrap->stderr, $err_good, 'is citrun_wrap stderr identical' ); -is( $? >> 8, 1, 'is citrun_wrap exit code 1' ); -#output_good="usage: citrun_wrap <build cmd>" -#ok_program "citrun_wrap -ASD" 1 "$output_good" citrun_wrap -ASD +like( $wrap->stderr, qr/$err_good/, 'is citrun_wrap stderr looking good' ); +isnt( $? >> 8, 0, 'is citrun_wrap exit code nonzero' ); diff --git a/wrap.sh b/wrap.sh @@ -1,7 +1,3 @@ -if [[ ${1} = -* ]]; then - echo "usage: citrun_wrap <build cmd>" - exit 1 -fi export PATH="%CITRUN_COMPILERS%:$PATH" exec $@