Skip to content

Commit e5242d2

Browse files
committed
Add transcript for setEcho
1 parent 15cd84c commit e5242d2

File tree

1 file changed

+24
-4
lines changed
  • unison-src/transcripts/idempotent

1 file changed

+24
-4
lines changed

unison-src/transcripts/idempotent/io.md

+24-4
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,14 @@ testSeek _ =
319319
320320
runTest test
321321
322+
testSetEcho : '{io2.IO} [Result]
323+
testSetEcho = do
324+
a = setEcho.impl (stdHandle StdErr) true
325+
b = setEcho.impl (stdHandle StdErr) false
326+
match (a, b) with
327+
(Right _, Right _) -> [ Ok "setEcho works" ]
328+
_ -> [ Fail "setEcho failure" ]
329+
322330
testAppend : '{io2.IO} [Result]
323331
testAppend _ =
324332
test = 'let
@@ -352,17 +360,19 @@ testAppend _ =
352360
353361
⍟ These new definitions are ok to `add`:
354362
355-
testAppend : '{IO} [Result]
356-
testSeek : '{IO} [Result]
363+
testAppend : '{IO} [Result]
364+
testSeek : '{IO} [Result]
365+
testSetEcho : '{IO} [Result]
357366
```
358367

359368
``` ucm
360369
scratch/main> add
361370
362371
⍟ I've added these definitions:
363372
364-
testAppend : '{IO} [Result]
365-
testSeek : '{IO} [Result]
373+
testAppend : '{IO} [Result]
374+
testSeek : '{IO} [Result]
375+
testSetEcho : '{IO} [Result]
366376
367377
scratch/main> io.test testSeek
368378
@@ -380,6 +390,16 @@ scratch/main> io.test testSeek
380390
381391
Tip: Use view 1 to view the source of a test.
382392
393+
scratch/main> io.test testSetEcho
394+
395+
New test results:
396+
397+
1. testSetEcho ◉ setEcho works
398+
399+
✅ 1 test(s) passing
400+
401+
Tip: Use view 1 to view the source of a test.
402+
383403
scratch/main> io.test testAppend
384404
385405
New test results:

0 commit comments

Comments
 (0)