- commit
- a0335318475750af60e9fe7e6cbaca19e25fb8dc
- parent
- bb9a3a1ca167752c8fc4ed606c940d4a9969e612
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2022-08-26 19:05
add simple test
Diffstat
| A | run_test.sh | 6 | ++++++ |
| A | test/test.pd | 20 | ++++++++++++++++++++ |
| A | test/test.xipd | 10 | ++++++++++ |
3 files changed, 36 insertions, 0 deletions
diff --git a/run_test.sh b/run_test.sh
@@ -0,0 +1,6 @@ -1 1 #!/bin/sh -e -1 2 -1 3 python3 -m xipd test/test.xipd > test/new.pd -1 4 trap 'rm test/new.pd' EXIT -1 5 diff -u test/test.pd test/new.pd -1 6 echo 'all fine!'
diff --git a/test/test.pd b/test/test.pd
@@ -0,0 +1,20 @@ -1 1 #N canvas; -1 2 #X obj 99.0 18.0 loadbang; -1 3 #X obj 27.0 162.0 osc~; -1 4 #X msg 36.0 90.0 1; -1 5 #X connect 0 0 2 0; -1 6 #X connect 2 0 1 0; -1 7 #X obj 126.0 378.0 phasor~; -1 8 #X obj 126.0 306.0 +~; -1 9 #X obj 99.0 234.0 *~; -1 10 #X msg 99.0 162.0 20; -1 11 #X connect 0 0 6 0; -1 12 #X connect 1 0 5 0; -1 13 #X connect 6 0 5 1; -1 14 #X msg 154.0 90.0 440; -1 15 #X connect 0 0 7 0; -1 16 #X connect 5 0 4 0; -1 17 #X connect 7 0 4 1; -1 18 #X connect 4 0 3 0; -1 19 #X obj 126.0 450.0 dac~; -1 20 #X connect 3 0 8 0;
diff --git a/test/test.xipd b/test/test.xipd
@@ -0,0 +1,10 @@
-1 1 include "../std.xipd"
-1 2
-1 3 osc(node, freq) {
-1 4 freq -> node
-1 5 return node
-1 6 }
-1 7
-1 8 osc1 = osc(`osc~`, 1)
-1 9 osc2 = osc(`phasor~`, osc1 *~ 20 +~ 440)
-1 10 osc2 -> `dac~`