mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 00:55:32 +00:00
add assert option to scratchpad command
This commit is contained in:
parent
ce3615b367
commit
abcd82daca
3 changed files with 49 additions and 19 deletions
|
@ -1,14 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
trap 'echo "ERROR in scratchpad.sh" >&2; exit 1' ERR
|
||||
|
||||
../../yosys -qp "scratchpad -set foo \"bar baz\"; \
|
||||
scratchpad -copy foo oof; scratchpad -unset foo; \
|
||||
tee -o scratchpad1.log scratchpad -get oof; \
|
||||
tee -o scratchpad2.log scratchpad -get foo"
|
||||
|
||||
test "$(cat scratchpad1.log)" = "bar baz"
|
||||
test "$(cat scratchpad2.log)" = "\"foo\" not set"
|
||||
|
||||
rm scratchpad1.log
|
||||
rm scratchpad2.log
|
5
tests/various/scratchpad.ys
Normal file
5
tests/various/scratchpad.ys
Normal file
|
@ -0,0 +1,5 @@
|
|||
scratchpad -set foo "bar baz"
|
||||
scratchpad -copy foo oof
|
||||
scratchpad -unset foo
|
||||
scratchpad -assert oof "bar baz"
|
||||
scratchpad -assert-unset foo
|
Loading…
Add table
Add a link
Reference in a new issue