diff options
-rw-r--r-- | testsuite/gna/bug0120/print1.ref | 25 | ||||
-rw-r--r-- | testsuite/gna/bug0120/print1.vhdl | 25 | ||||
-rw-r--r-- | testsuite/gna/bug0120/print2.ref | 1 | ||||
-rwxr-xr-x | testsuite/gna/bug0120/testsuite.sh | 11 |
4 files changed, 62 insertions, 0 deletions
diff --git a/testsuite/gna/bug0120/print1.ref b/testsuite/gna/bug0120/print1.ref new file mode 100644 index 000000000..6a16467fe --- /dev/null +++ b/testsuite/gna/bug0120/print1.ref @@ -0,0 +1,25 @@ +entity print1 is +end; + +architecture behav of print1 is + -- Check comment 1 + -- Check comment 2 + + -- Check long declaration indentation + constant bv1: bit_vector := + "0010001"; + constant bv2: bit_vector := x"af"; + -- Trailing comment +begin + /* A long comment + for vhdl 08 + */ + + process + begin + if (true /= false) + then + report "OK"; + end if; + end process; +end behav; diff --git a/testsuite/gna/bug0120/print1.vhdl b/testsuite/gna/bug0120/print1.vhdl new file mode 100644 index 000000000..39e74c973 --- /dev/null +++ b/testsuite/gna/bug0120/print1.vhdl @@ -0,0 +1,25 @@ +entity print1 is +end; + +architecture behav of print1 is + -- Check comment 1 + -- Check comment 2 + + -- Check long declaration indentation + constant bv1 : bit_vector := + "0010001"; +constant bv2 : bit_vector := x"af"; + -- Trailing comment +begin + /* A long comment + for vhdl 08 + */ + + process + begin + if(true/=false) + then + report "OK"; + end if; + end process; +end behav; diff --git a/testsuite/gna/bug0120/print2.ref b/testsuite/gna/bug0120/print2.ref new file mode 100644 index 000000000..16f27b1a6 --- /dev/null +++ b/testsuite/gna/bug0120/print2.ref @@ -0,0 +1 @@ + "0010001"; diff --git a/testsuite/gna/bug0120/testsuite.sh b/testsuite/gna/bug0120/testsuite.sh new file mode 100755 index 000000000..dc4eed9b0 --- /dev/null +++ b/testsuite/gna/bug0120/testsuite.sh @@ -0,0 +1,11 @@ +#! /bin/sh + +. ../../testenv.sh + +$GHDL fmt --std=08 --level=space print1.vhdl > print1.out +diff --strip-trailing-cr print1.ref print1.out + +$GHDL fmt --std=08 --range=10:10 print1.vhdl > print2.out +diff --strip-trailing-cr print2.ref print2.out + +echo "Test successful" |