citrun

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

commit a0898f89ccf515552de25b8dd0a5b7f4fad65d75
parent e377703b4e9f1a59f05707a4c2015400f3e2d7d0
Author: Kyle Milz <kyle@0x30.net>
Date:   Fri, 19 Aug 2016 23:46:31 -0600

t/fail: check the log

Diffstat:
Mt/inst_fail.sh | 20++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/t/inst_fail.sh b/t/inst_fail.sh @@ -1,13 +1,29 @@ # # Check that a program that won't compile natively is handled properly. # -echo 1..3 +echo 1..4 . test/utils.sh echo "int main(void) { return 0; " > bad.c $TEST_TOOLS/citrun-wrap gcc -c bad.c 2> err.out [ $? -eq 1 ] && echo ok 2 + grep -q "error: expected" err.out && echo ok 3 -$TEST_TOOLS/citrun-check +cat <<EOF > check.good +Summary: + 1 Calls to the rewrite tool + 1 Source files used as input + 1 Rewrite parse errors + 1 Rewrite failures + +Totals: + 2 Lines of source code + 1 Function definitions + 1 Return statement values + 3 Total statements +EOF + +$TEST_TOOLS/citrun-check > check.out +check_diff 4