aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuite/gna/ticket48/ref.vhdl6
-rw-r--r--testsuite/gna/ticket48/ref1.vhdl7
-rwxr-xr-xtestsuite/gna/ticket48/testsuite.sh34
3 files changed, 47 insertions, 0 deletions
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"