From 91dd144137577084d9b88642fd0283198924f0b1 Mon Sep 17 00:00:00 2001 From: Zachary Snow Date: Thu, 25 Apr 2019 15:22:45 -0400 Subject: [PATCH] check for multi-dim arrays and SV types in test runner --- test/lib/runner.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/lib/runner.sh b/test/lib/runner.sh index ec6c3dd..78576fd 100644 --- a/test/lib/runner.sh +++ b/test/lib/runner.sh @@ -53,9 +53,14 @@ assertConverts() { assertTrue "3rd conversion of $ac_file failed" $? diff "$ac_tmpb" "$ac_tmpc" > /dev/null assertTrue "conversion of $ac_file not stable after the second iteration" $? - # using sed to remove quoted strings because "$bits" may be printed - sed -E 's/"([^"]|\")+"//g' "$ac_tmpa" | grep "\$bits" > /dev/null + # using sed to remove quoted strings + filtered=`sed -E 's/"([^"]|\")+"//g' "$ac_tmpa"` + echo "$filtered" | grep "\$bits" > /dev/null assertFalse "conversion of $ac_file still contains \$bits" $? + echo "$filtered" | grep "\]\[" > /dev/null + assertFalse "conversion of $ac_file still contains multi-dim arrays" $? + echo "$filtered" | egrep "\s(int\|bit\|logic\|byte\|struct\|enum\|longint\|shortint)\s" + assertFalse "conversion of $ac_file still contains SV types" $? } simpleTest() {