aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlberto Gonzalez <boqwxp@airmail.cc>2020-03-23 06:13:48 +0000
committerAlberto Gonzalez <boqwxp@airmail.cc>2020-03-23 17:30:53 +0000
commit1b333d49ef0144d6f440b1c6cc57a6a6e2d4a1de (patch)
tree40a2b7dd10e0e01a03eaf867b324a48a0b82f863 /tests
parent5026f36250b7043195566b33fa0fae60746c4d97 (diff)
downloadyosys-1b333d49ef0144d6f440b1c6cc57a6a6e2d4a1de.tar.gz
yosys-1b333d49ef0144d6f440b1c6cc57a6a6e2d4a1de.tar.bz2
yosys-1b333d49ef0144d6f440b1c6cc57a6a6e2d4a1de.zip
Add tests for `select` command warnings.
Diffstat (limited to 'tests')
-rw-r--r--tests/select/no_warn_prefixed_empty_select_arg.ys3
-rwxr-xr-xtests/select/run-test.sh6
-rw-r--r--tests/select/warn_empty_select_arg.ys3
3 files changed, 12 insertions, 0 deletions
diff --git a/tests/select/no_warn_prefixed_empty_select_arg.ys b/tests/select/no_warn_prefixed_empty_select_arg.ys
new file mode 100644
index 000000000..617e0d63e
--- /dev/null
+++ b/tests/select/no_warn_prefixed_empty_select_arg.ys
@@ -0,0 +1,3 @@
+logger -expect-no-warnings
+select n:foo/bar*
+select t:$assert
diff --git a/tests/select/run-test.sh b/tests/select/run-test.sh
new file mode 100755
index 000000000..44ce7e674
--- /dev/null
+++ b/tests/select/run-test.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+set -e
+for x in *.ys; do
+ echo "Running $x.."
+ ../../yosys -ql ${x%.ys}.log $x
+done
diff --git a/tests/select/warn_empty_select_arg.ys b/tests/select/warn_empty_select_arg.ys
new file mode 100644
index 000000000..55aca8eb6
--- /dev/null
+++ b/tests/select/warn_empty_select_arg.ys
@@ -0,0 +1,3 @@
+logger -expect warning "did not match any module." 1
+logger -expect warning "did not match any object." 1
+select foo/bar