citrun

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

commit 1a4df09e63610e40d281560ed621eff14f8e95af
parent 3e97af28d2abb90a01178917ab1f4aff11c3190e
Author: Kyle Milz <kyle@0x30.net>
Date:   Wed, 27 Jul 2016 17:21:53 -0600

t: add test for -E flag

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

diff --git a/t/inst_preprocess.t b/t/inst_preprocess.t @@ -0,0 +1,17 @@ +#!/bin/sh + +echo 1..2 + +tmpfile=`mktemp`.c +logfile=`mktemp` + +echo "int main(void) { return 0; }" > $tmpfile + +export PATH="`pwd`/src:${PATH}" +gcc -E $tmpfile > $logfile 2>&1 + +[ $? -eq 0 ] && echo ok 1 +grep -q "int main(void) { return 0; }" $logfile && echo ok 2 + +rm $tmpfile +rm $logfile