Skip to content

Commit dca7cd1

Browse files
committed
Refine the text around statusAtExit always being set
1 parent 23110c5 commit dca7cd1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Sources/Testing/Testing.docc/exit-testing.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ library records an issue.
9292

9393
By default, the child process is configured without a standard output or
9494
standard error stream. If your test needs to review the content of either of
95-
these streams, you can pass its key path in the `observedValues` argument:
95+
these streams, you can pass its key path to ``expect(exitsWith:observing:_:sourceLocation:performing:)``
96+
or ``require(exitsWith:observing:_:sourceLocation:performing:)``:
9697

9798
```swift
9899
extension Customer {
@@ -126,8 +127,9 @@ extension Customer {
126127
running in an exit test may write to it including the operating system and any
127128
third-party dependencies you have declared in your package.
128129

129-
The actual exit condition of the child process is always reported by the testing
130-
library even if you do not specify it in `observedValues`.
130+
The testing library always sets ``ExitTest/Result/statusAtExit`` to the actual
131+
exit status of the child process (as reported by the system) even if you do not
132+
pass it.
131133

132134
### Constraints on exit tests
133135

0 commit comments

Comments
 (0)