citrun

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

commit d4a30e3b071398e1e49bb6d2ec4594c4535f1396
parent af6ba7c2f58e657b0c9d84b6930d49bee47b5d6c
Author: Kyle Milz <kyle@0x30.net>
Date:   Wed, 27 Jul 2016 00:04:24 -0600

t: add test for no PATH set

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

diff --git a/t/inst_nopath.t b/t/inst_nopath.t @@ -0,0 +1,19 @@ +#!/bin/sh + +# Test that not having PATH set errors out. +# +echo 1..2 +unset PATH + +tmpfile=`mktemp` +src/gcc -c nomatter.c 2> $tmpfile + +if [ $? -eq 1 ]; then + echo ok 1 +fi + +if grep -q "PATH must be set" $tmpfile; then + echo ok 2 +fi + +rm $tmpfile