aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/bug032
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2015-12-29 22:32:08 +0100
committerTristan Gingold <gingold@adacore.com>2015-12-29 22:32:08 +0100
commit8f2a3196503cc53a8b84a00ed5c6ea5574e5c6d1 (patch)
treeb7e65f63d31ef88158b507178296a3715d73b320 /testsuite/gna/bug032
parent5da63358e1dcc72fd25a1a299ac585d8ece05ccb (diff)
downloadghdl-8f2a3196503cc53a8b84a00ed5c6ea5574e5c6d1.tar.gz
ghdl-8f2a3196503cc53a8b84a00ed5c6ea5574e5c6d1.tar.bz2
ghdl-8f2a3196503cc53a8b84a00ed5c6ea5574e5c6d1.zip
Add tests for --work option.
Diffstat (limited to 'testsuite/gna/bug032')
-rw-r--r--testsuite/gna/bug032/allnl.vhdl5
-rw-r--r--testsuite/gna/bug032/p.vhdl2
-rwxr-xr-xtestsuite/gna/bug032/testsuite.sh55
3 files changed, 62 insertions, 0 deletions
diff --git a/testsuite/gna/bug032/allnl.vhdl b/testsuite/gna/bug032/allnl.vhdl
new file mode 100644
index 000000000..e7791c829
--- /dev/null
+++ b/testsuite/gna/bug032/allnl.vhdl
@@ -0,0 +1,5 @@
+package allnl is
+ constant cr_eol : integer := 0;
+ constant lf_eol : integer := 0; constant crlf_eol : integer := 0;
+ constant lfcr_eol : integer := 0;
+end allnl;
diff --git a/testsuite/gna/bug032/p.vhdl b/testsuite/gna/bug032/p.vhdl
new file mode 100644
index 000000000..584a5324c
--- /dev/null
+++ b/testsuite/gna/bug032/p.vhdl
@@ -0,0 +1,2 @@
+package p is
+end p;
diff --git a/testsuite/gna/bug032/testsuite.sh b/testsuite/gna/bug032/testsuite.sh
new file mode 100755
index 000000000..5e3301810
--- /dev/null
+++ b/testsuite/gna/bug032/testsuite.sh
@@ -0,0 +1,55 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+# Incorrect options are always rejected (analyze_failure doesn't work here)
+
+# No identifier
+! $GHDL -a --work= p.vhdl
+
+# No extended identifiers in v87
+! $GHDL -a --std=87 '--work=\wrk\' p.vhdl
+
+# Empty extended identifier
+! $GHDL -a '--work=\\' p.vhdl
+
+# Missing ending \
+! $GHDL -a --work=\\wrk p.vhdl
+
+# Ok
+$GHDL -a "--work=\\wrk \\" p.vhdl
+$GHDL --remove "--work=\\wrk \\"
+
+# FIXME
+# $GHDL -a '--work=\wr\\k \' p.vhdl
+
+# Invalid char in extended identifier
+! $GHDL -a '--work=\wrk \' p.vhdl
+! $GHDL -a '--work=\wrk\' p.vhdl
+
+# Non doubled \ in extended identifier
+! $GHDL -a '--work=\wr\k\' p.vhdl
+
+# Incorrect doubled \ in extended identifier
+! $GHDL -a '--work=\wrk\\' p.vhdl
+
+# Incorrect char in identifier (v87)
+! $GHDL -a --std=87 '--work=wåk' p.vhdl
+! $GHDL -a --std=87 '--work=wÅk' p.vhdl
+
+# Incorrect char in indentifier
+! $GHDL -a --work="wrk" p.vhdl
+! $GHDL -a --work="wrk/" p.vhdl
+
+# Incorrect use of _
+! $GHDL -a --work=_wrk p.vhdl
+! $GHDL -a --work=wrk_ p.vhdl
+! $GHDL -a --work=wr__k p.vhdl
+
+
+# File with various end of lines
+analyze allnl.vhdl
+
+clean
+
+echo "Test successful"