citrun

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

commit e6c9ce682376b79c92fc9ad9c05f892bdfb6313b
parent 309fd51a261967e48fccbe0ec0e83285dff9ee5e
Author: kyle <kyle@0x30.net>
Date:   Sat, 19 Nov 2016 18:44:26 -0700

t: add new test for -ansi flag

Diffstat:
At/e2e_ansi.sh | 34++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+), 0 deletions(-)

diff --git a/t/e2e_ansi.sh b/t/e2e_ansi.sh @@ -0,0 +1,34 @@ +#!/bin/sh +# +# Check that instrumentation works when the -ansi flag is passed during +# compilation. +# +. t/utils.subr +plan 4 + +cat <<EOF > main.c +int +main(void) { + return 0; +} +EOF + +cat <<EOF > check.good +Summary: + 1 Source files used as input + 1 Application link commands + 1 Rewrite successes + 1 Rewritten source compile successes + +Totals: + 5 Lines of source code + 1 Function definitions + 1 Return statement values + 3 Total statements +EOF + +ok "is compile successful" $CITRUN_TOOLS/citrun-wrap cc -ansi -o main main.c +ok "is citrun-check exit 0" $CITRUN_TOOLS/citrun-check -o check.out + +strip_millis check.out +ok "is citrun-check output different" diff -u check.good check.out