From b99e2d89d36dad8ac34b3fedb3496ed705df8092 Mon Sep 17 00:00:00 2001 From: Tristan Gingold <tgingold@free.fr> Date: Sun, 23 May 2021 08:08:52 +0200 Subject: testsuite/gna: add a test for previous commit --- testsuite/gna/bug0122/tab1.ref | 21 +++++++++++++++++++++ testsuite/gna/bug0122/tab1.vhdl | 10 ++++++++++ testsuite/gna/bug0122/testsuite.sh | 8 ++++++++ 3 files changed, 39 insertions(+) create mode 100644 testsuite/gna/bug0122/tab1.ref create mode 100644 testsuite/gna/bug0122/tab1.vhdl create mode 100755 testsuite/gna/bug0122/testsuite.sh diff --git a/testsuite/gna/bug0122/tab1.ref b/testsuite/gna/bug0122/tab1.ref new file mode 100644 index 000000000..a5383bac3 --- /dev/null +++ b/testsuite/gna/bug0122/tab1.ref @@ -0,0 +1,21 @@ +tab1.vhdl:3:7: two underscores can't be consecutive + p__1 : bit; + ^ +tab1.vhdl:4:10: two underscores can't be consecutive + abcd__2 : bit; + ^ +tab1.vhdl:5:8: an identifier cannot finish with '_' + bad_ : bit; + ^ +tab1.vhdl:6:14: an identifier cannot finish with '_' + ontab_ : bit; + ^ +tab1.vhdl:7:14: an identifier cannot finish with '_' + notab_ : bit; + ^ +tab1.vhdl:8:5: an identifier can't start with '_' + _err : bit; + ^ +tab1.vhdl:9:26: underscore must be followed by a digit + num : integer := 1_2_); + ^ diff --git a/testsuite/gna/bug0122/tab1.vhdl b/testsuite/gna/bug0122/tab1.vhdl new file mode 100644 index 000000000..dfe8b2bf4 --- /dev/null +++ b/testsuite/gna/bug0122/tab1.vhdl @@ -0,0 +1,10 @@ +entity tab1 is + port ( + p__1 : bit; + abcd__2 : bit; + bad_ : bit; + ontab_ : bit; + notab_ : bit; + _err : bit; + num : integer := 1_2_); +end tab1; diff --git a/testsuite/gna/bug0122/testsuite.sh b/testsuite/gna/bug0122/testsuite.sh new file mode 100755 index 000000000..88f3ba309 --- /dev/null +++ b/testsuite/gna/bug0122/testsuite.sh @@ -0,0 +1,8 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze_failure tab1.vhdl 2> tab1.err +diff --strip-trailing-cr tab1.ref tab1.err + +echo "Test successful" -- cgit v1.2.3