diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-06-28 19:34:17 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-06-28 19:34:17 +0200 |
commit | de6b31cc28c9b29bf9bb70a0831aeb9b513c5ed5 (patch) | |
tree | 56ee823f8a7071dddc9a41f5a39234a268e5c9f0 | |
parent | 1b1d517fba9e9ed7656f74e036c817cf84b622e2 (diff) | |
download | ghdl-de6b31cc28c9b29bf9bb70a0831aeb9b513c5ed5.tar.gz ghdl-de6b31cc28c9b29bf9bb70a0831aeb9b513c5ed5.tar.bz2 ghdl-de6b31cc28c9b29bf9bb70a0831aeb9b513c5ed5.zip |
testsuite/gna: add a test for #2115
-rw-r--r-- | testsuite/gna/issue2115/ent.vhdl | 19 | ||||
-rwxr-xr-x | testsuite/gna/issue2115/testsuite.sh | 19 |
2 files changed, 38 insertions, 0 deletions
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" |