citrun

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

commit f91e82cbc0fef2e1af07120ddf52816051e605b8
parent 40af015cca1882a849d3b2e7b8286025813d2d16
Author: Kyle Milz <kyle@0x30.net>
Date:   Sun,  8 Jan 2017 19:25:45 -0700

t: scale back and fix path test

Diffstat:
Mt/inst_path.t | 25++++++-------------------
1 file changed, 6 insertions(+), 19 deletions(-)

diff --git a/t/inst_path.t b/t/inst_path.t @@ -1,33 +1,20 @@ # # Test that: -# - not having PATH set errors -# - not having CITRUN_SHARE in PATH when using transparent compile mode errors +# - TODO: not having PATH set errors +# - not having CITRUN_PATH set when using transparent compile mode errors # use strict; use warnings; use Test::Cmd; -use Test::More tests => 6; +use Test::More tests => 3; -my $cc = Test::Cmd->new( prog => 'cc', workdir => '' ); -delete $ENV{'PATH'}; -$cc->run( args => "-c nomatter.c", chdir => $cc->curdir ); +my $cc = Test::Cmd->new( prog => 'compilers/cc', workdir => '' ); -# XXX: Somethings wrong here. The commented error should be displayed when PATH -# is not set at all. -my $error_good = "citrun_inst: Error: CITRUN_SHARE not in PATH. +my $error_good = "Error: compilers not in PATH. "; -#my $error_good = 'citrun_inst: Error: PATH is not set.'; +$cc->run( args => '', chdir => $cc->curdir ); is( $cc->stdout, '', 'is cc stdout empty' ); is( $cc->stderr, $error_good, 'is cc stderr identical' ); is( $? >> 8, 1, 'is cc exit code 1' ); - -$ENV{PATH} = ""; -$error_good = "citrun_inst: Error: CITRUN_SHARE not in PATH. -"; -$cc->run( args => "-c nomatter.c", chdir => $cc->curdir ); - -is( $cc->stdout, '', 'is cc stdout identical' ); -is( $cc->stderr, $error_good, 'is cc stderr empty' ); -is( $? >> 8, 1, 'is cc exit code 1' );