1
1
defmodule ExUnit.CaptureIO do
2
2
@moduledoc % S """
3
- This module provides functionality to capture IO to test it .
3
+ Functionality to capture IO for testing .
4
4
5
5
## Examples
6
6
@@ -19,16 +19,18 @@ defmodule ExUnit.CaptureIO do
19
19
"""
20
20
21
21
@ doc """
22
- Captures IO. Returns nil in case of no output,
22
+ Captures IO generated when evaluating `fun`.
23
+
24
+ Returns `nil` in case of no output,
23
25
otherwise returns the binary which is the captured output.
24
26
25
- By default, capture_io replaces the group_leader (`:stdio`)
27
+ By default, ` capture_io` replaces the ` group_leader` (`:stdio`)
26
28
for the current process. However, the capturing of any other
27
- named device like `:stderr` is also possible globally by
28
- giving the registered device name explicitly as argument.
29
+ named device, such as `:stderr`, is also possible globally by
30
+ giving the registered device name explicitly as an argument.
29
31
30
- When capturing `:stdio` and the `:capture_prompt` option is `false`,
31
- prompts (specified as arguments in IO.get* functions) are not
32
+ When capturing `:stdio`, if the `:capture_prompt` option is `false`,
33
+ prompts (specified as arguments to ` IO.get*` functions) are not
32
34
captured.
33
35
34
36
A developer can set a string as an input. The default
0 commit comments