From 9f700fc624a10e380198df0b53f874a3de963560 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 13 May 2015 06:58:04 +0200 Subject: Ticket 48 testcase. --- testsuite/gna/ticket48/ref.vhdl | 6 ++++++ testsuite/gna/ticket48/ref1.vhdl | 7 +++++++ testsuite/gna/ticket48/testsuite.sh | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 testsuite/gna/ticket48/ref.vhdl create mode 100644 testsuite/gna/ticket48/ref1.vhdl create mode 100755 testsuite/gna/ticket48/testsuite.sh (limited to 'testsuite/gna/ticket48') diff --git a/testsuite/gna/ticket48/ref.vhdl b/testsuite/gna/ticket48/ref.vhdl new file mode 100644 index 000000000..f9c574f89 --- /dev/null +++ b/testsuite/gna/ticket48/ref.vhdl @@ -0,0 +1,6 @@ +entity ent is +end entity; + +architecture a of ent is +begin +end architecture; diff --git a/testsuite/gna/ticket48/ref1.vhdl b/testsuite/gna/ticket48/ref1.vhdl new file mode 100644 index 000000000..aeffbb7b8 --- /dev/null +++ b/testsuite/gna/ticket48/ref1.vhdl @@ -0,0 +1,7 @@ +entity ent is +end entity; + +architecture a of ent is +begin + -- Comment added. +end architecture; diff --git a/testsuite/gna/ticket48/testsuite.sh b/testsuite/gna/ticket48/testsuite.sh new file mode 100755 index 000000000..bf40a99a3 --- /dev/null +++ b/testsuite/gna/ticket48/testsuite.sh @@ -0,0 +1,34 @@ +#! /bin/sh + +. ../../testenv.sh + +# Build from scratch +cp ref.vhdl bug.vhdl +analyze bug.vhdl +elab_simulate ent + +# No change. +touch bug.vhdl +elab_simulate ent + +# Still no change. +cp ref.vhdl bug.vhdl +elab_simulate ent + +# Modify file +cp ref1.vhdl bug.vhdl +if elab_simulate ent; then + # cannot use elab_simulate_failure as it doesn't work in that case (it's a + # feature: it expects only simulation failures). + echo "failure expected" + exit 1 +fi + +# Re-analyze +analyze bug.vhdl +elab_simulate ent + +rm -f bug.vhdl +clean + +echo "Test successful" -- cgit v1.2.3