From de6b31cc28c9b29bf9bb70a0831aeb9b513c5ed5 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 28 Jun 2022 19:34:17 +0200 Subject: testsuite/gna: add a test for #2115 --- testsuite/gna/issue2115/ent.vhdl | 19 +++++++++++++++++++ testsuite/gna/issue2115/testsuite.sh | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 testsuite/gna/issue2115/ent.vhdl create mode 100755 testsuite/gna/issue2115/testsuite.sh diff --git a/testsuite/gna/issue2115/ent.vhdl b/testsuite/gna/issue2115/ent.vhdl new file mode 100644 index 000000000..23407ccf5 --- /dev/null +++ b/testsuite/gna/issue2115/ent.vhdl @@ -0,0 +1,19 @@ +entity ent is +end entity; + +architecture a of ent is +begin + process + variable b : boolean; + variable l : std.textio.line; + begin + b := false; + std.textio.write(l, b); + report l.all & " should be false"; + l := null; + b := true; + std.textio.write(l, b); + report l.all & " should be true"; + wait; + end process; +end; diff --git a/testsuite/gna/issue2115/testsuite.sh b/testsuite/gna/issue2115/testsuite.sh new file mode 100755 index 000000000..c562f1efd --- /dev/null +++ b/testsuite/gna/issue2115/testsuite.sh @@ -0,0 +1,19 @@ +#! /bin/sh + +. ../../testenv.sh + +export GHDL_STD_FLAGS=--std=08 +analyze ent.vhdl +elab_simulate ent > ent.out + +if grep TRUE ent.out; then + exit 1 +fi + +if grep FALSE ent.out; then + exit 1 +fi + +clean + +echo "Test successful" -- cgit v1.2.3