From 39a34058f1de6c2c80b9f39fe36890f66a111f86 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 21 Dec 2015 19:51:38 +0100 Subject: Add testcase for ticket101. --- testsuite/gna/ticket101/junk2.vhdl | 7 +++++++ testsuite/gna/ticket101/testsuite.sh | 10 ++++++++++ testsuite/testenv.sh | 10 ++++++++-- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 testsuite/gna/ticket101/junk2.vhdl create mode 100755 testsuite/gna/ticket101/testsuite.sh (limited to 'testsuite') diff --git a/testsuite/gna/ticket101/junk2.vhdl b/testsuite/gna/ticket101/junk2.vhdl new file mode 100644 index 000000000..bece38ff4 --- /dev/null +++ b/testsuite/gna/ticket101/junk2.vhdl @@ -0,0 +1,7 @@ +package t_Junk2 is + type ufixed is array (integer range <>) of bit; + type t_MULTIPLIERS is array(15 downto -16) of ufixed(7 downto -8); +-- type t_MULTIPLIERS is array(15 downto 1) of ufixed(7 downto -1); -- Will compile correctly +-- type t_MULTIPLIERS is array(15 downto -1) of ufixed(7 downto 1); -- Will not compile correctly +end package t_Junk2; + diff --git a/testsuite/gna/ticket101/testsuite.sh b/testsuite/gna/ticket101/testsuite.sh new file mode 100755 index 000000000..927e66c10 --- /dev/null +++ b/testsuite/gna/ticket101/testsuite.sh @@ -0,0 +1,10 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze junk2.vhdl +analyze_failure --std=93 junk2.vhdl +analyze --std=02 -frelaxed-rules junk2.vhdl +clean + +echo "Test successful" diff --git a/testsuite/testenv.sh b/testsuite/testenv.sh index 60dc09eca..21a681d26 100644 --- a/testsuite/testenv.sh +++ b/testsuite/testenv.sh @@ -124,7 +124,13 @@ clean () echo "Remove work library" "$GHDL" --remove $GHDL_STD_FLAGS else - echo "Remove $1 library" - "$GHDL" --remove $GHDL_STD_FLAGS --work=$1 + case "$1" in + --std=*) + echo "Remove work library" + "$GHDL" --remove $1 ;; + *) + echo "Remove $1 library" + "$GHDL" --remove $GHDL_STD_FLAGS --work=$1 ;; + esac fi } -- cgit v1.2.3