bugfixes to tests discoverd while getting interpreter working again
[fleet.git] / tests / codebags / torpedoing-loops.fleet
diff --git a/tests/codebags/torpedoing-loops.fleet b/tests/codebags/torpedoing-loops.fleet
new file mode 100644 (file)
index 0000000..e4f0542
--- /dev/null
@@ -0,0 +1,42 @@
+#expect 5
+#expect 5
+#expect 3
+
+#ship debug  : Debug
+#ship memory : Memory
+#ship fifo   : Fifo
+
+debug.in:
+  [*] set olc=1;
+  set word=5;
+  head;
+    send token to fifo.out;
+    [T] recv token;
+    deliver;
+    [d] abort;
+    [d] send token to memory.inCBD;
+  tail;
+
+fifo.out:
+  [*] set olc=3;
+  head;
+    recv token;
+    set olc--;
+    send token to debug.in;
+    [d] abort;
+    [d] send token to debug.in:i;
+  tail;
+
+memory.out:
+ set ilc=*;
+ collect packet, send;
+
+memory.inCBD:
+  set word={
+    debug.in:
+      [*] set olc=1;
+      set word=3;
+      deliver;
+  };
+  recv token;
+  deliver;