summaryrefslogtreecommitdiff
path: root/testsuite/gna/ticket84
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/gna/ticket84')
-rw-r--r--testsuite/gna/ticket84/bug.vhdl27
-rwxr-xr-xtestsuite/gna/ticket84/testsuite.sh16
2 files changed, 43 insertions, 0 deletions
diff --git a/testsuite/gna/ticket84/bug.vhdl b/testsuite/gna/ticket84/bug.vhdl
new file mode 100644
index 0000000..8541a70
--- /dev/null
+++ b/testsuite/gna/ticket84/bug.vhdl
@@ -0,0 +1,27 @@
+use std.textio.all;
+
+entity ent is
+end entity;
+
+architecture a of ent is
+begin
+ main : process
+ type binary_file is file of character;
+ file fptr_text : text;
+ file fptr_binary : binary_file;
+ begin
+ file_open(fptr_text, "file.txt", write_mode);
+ write(fptr_text, string'("a"));
+ write(fptr_text, string'("b"));
+ file_close(fptr_text);
+
+ file_open(fptr_binary, "file.raw", write_mode);
+ write(fptr_binary, character'('a'));
+ write(fptr_binary, character'('b'));
+ file_close(fptr_binary);
+
+ write(output, string'("a"));
+ write(output, string'("b"));
+ wait;
+ end process;
+end architecture;
diff --git a/testsuite/gna/ticket84/testsuite.sh b/testsuite/gna/ticket84/testsuite.sh
new file mode 100755
index 0000000..aad3f12
--- /dev/null
+++ b/testsuite/gna/ticket84/testsuite.sh
@@ -0,0 +1,16 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze bug.vhdl
+elab_simulate ent
+clean
+
+if ! cmp file.txt file.raw; then
+ echo "Comparison mismatch"
+ exit 1
+fi
+
+rm -f file.txt file.raw
+
+echo "Test successful"