Added a couple of testcase programs for reading from the keyboard and echoing

This commit is contained in:
Neil Brown 2008-03-24 23:46:43 +00:00
parent 986a4acb2b
commit 2107960442
2 changed files with 19 additions and 0 deletions

8
testcases/echo.occ Normal file
View File

@ -0,0 +1,8 @@
PROC echo(CHAN BYTE in, out)
BYTE c:
WHILE TRUE
SEQ
in ? c
out ! c
out ! c
:

11
testcases/echoquit.rain Normal file
View File

@ -0,0 +1,11 @@
process main(?uint8: in, !uint8: out, !uint8: err)
{
uint8: c;
in ? c;
while (c <> 'q')
{
out ! c;
out ! c;
in ? c;
}
}