aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/various/scratchpad.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/various/scratchpad.sh b/tests/various/scratchpad.sh
new file mode 100755
index 000000000..4e92473f8
--- /dev/null
+++ b/tests/various/scratchpad.sh
@@ -0,0 +1,14 @@
+#!/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