From 40e915ba8a1554191d4b650879d4863a703e071c Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 20 Jun 2017 06:01:11 +0200 Subject: Add testcase for #371 --- testsuite/gna/issue371/test_string.vhdl | 20 ++++++++++++++++++++ testsuite/gna/issue371/testsuite.sh | 18 ++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 testsuite/gna/issue371/test_string.vhdl create mode 100755 testsuite/gna/issue371/testsuite.sh (limited to 'testsuite/gna/issue371') diff --git a/testsuite/gna/issue371/test_string.vhdl b/testsuite/gna/issue371/test_string.vhdl new file mode 100644 index 000000000..b178a31b8 --- /dev/null +++ b/testsuite/gna/issue371/test_string.vhdl @@ -0,0 +1,20 @@ +-- VHDL source file +library ieee; +use ieee.std_logic_1164.all; +use ieee.numeric_std.all; + +entity test_string is +end entity; + +architecture rtl of test_string is + signal clk : std_logic := '1'; + signal test : string (1 to 11) := "Hello World"; +begin + clk <= not clk after 10 ns; + p_test : process + begin + wait for 1 us; + test <= "hello world"; + wait; + end process; +end rtl; diff --git a/testsuite/gna/issue371/testsuite.sh b/testsuite/gna/issue371/testsuite.sh new file mode 100755 index 000000000..147ab74c4 --- /dev/null +++ b/testsuite/gna/issue371/testsuite.sh @@ -0,0 +1,18 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze test_string.vhdl +elab test_string + +if ghdl_has_feature test_string ghw; then + simulate test_string --wave=sim.ghw --stop-time=20ns +fi + +clean +if [ $# -eq 0 ]; then + rm -f sim.ghw +fi + + +echo "Test successful" -- cgit v1.2.3