about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-01-13 22:06:19 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-01-13 22:06:19 -0800
commitf306071516c6f1b06aff7684a292bcc79eadad08 (patch)
treeca576485bb47630f85244ed742bae7149b0d8429
parentc1f8217a7c02316823d12f6638573ad7b987ee4f (diff)
downloadmu-f306071516c6f1b06aff7684a292bcc79eadad08.tar.gz
557
-rw-r--r--chessboard-cursor.arc.t26
1 files changed, 26 insertions, 0 deletions
diff --git a/chessboard-cursor.arc.t b/chessboard-cursor.arc.t
index 473308f3..a3edfab0 100644
--- a/chessboard-cursor.arc.t
+++ b/chessboard-cursor.arc.t
@@ -37,6 +37,32 @@
 ;? (quit)
 
 (reset)
+(new-trace "read-move-incomplete")
+(add-code:readfile "chessboard-cursor.mu")
+(add-code
+  '((function! main [
+      (default-space:space-address <- new space:literal 30:literal/capacity)
+      (1:channel-address/raw <- init-channel 3:literal)
+      (r:integer/routine <- fork-helper read-move:fn nil:literal/globals 200:literal/limit)
+      (c:character <- copy ((#\a literal)))
+      (x:tagged-value <- save-type c:character)
+      (1:channel-address/raw/deref <- write 1:channel-address/raw x:tagged-value)
+      (c:character <- copy ((#\2 literal)))
+      (x:tagged-value <- save-type c:character)
+      (1:channel-address/raw/deref <- write 1:channel-address/raw x:tagged-value)
+      (c:character <- copy ((#\- literal)))
+      (x:tagged-value <- save-type c:character)
+      (1:channel-address/raw/deref <- write 1:channel-address/raw x:tagged-value)
+      (c:character <- copy ((#\a literal)))
+      (x:tagged-value <- save-type c:character)
+      (1:channel-address/raw/deref <- write 1:channel-address/raw x:tagged-value)
+      (sleep until-routine-done:literal r:integer/routine)
+     ])))
+(run 'main)
+(if (ran-to-completion 'read-move)
+  (prn "F - chessboard hangs until 5 characters are entered"))
+
+(reset)
 (new-trace "read-move-quit")
 (add-code:readfile "chessboard-cursor.mu")
 (add-code