We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16219d0 commit 50f59c5Copy full SHA for 50f59c5
test/Main.purs
@@ -21,6 +21,26 @@ main = do
21
nonExistentExecutable $ do
22
log "all good."
23
24
+ log "doesn't perform effects too early"
25
+ ls <- spawn "ls" ["-la"] defaultSpawnOptions
26
+ let unused = kill SIGTERM ls
27
+ onExit ls \exit ->
28
+ case exit of
29
+ Normally 0 ->
30
+ log "All good!"
31
+ _ -> do
32
+ log ("Bad exit: expected `Normally 0`, got: " <> show exit)
33
+
34
+ log "kills processes"
35
36
+ kill SIGTERM ls
37
38
39
+ BySignal SIGTERM ->
40
41
42
+ log ("Bad exit: expected `BySignal SIGTERM`, got: " <> show exit)
43
44
spawnLs = do
45
ls <- spawn "ls" ["-la"] defaultSpawnOptions
46
onExit ls \exit ->
0 commit comments