unison/unison-src/transcripts/io-test-command.output.md

79 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

2023-12-13 23:30:29 +03:00
The `io.test` command should run all of the tests within the current namespace, excluding libs.
``` unison
2023-12-13 23:30:29 +03:00
-- We manually specify types so we don't need to pull in base to run IO and such
ioAndExceptionTest : '{IO, Exception} [Result]
ioAndExceptionTest = do
[Ok "Success"]
ioTest : '{IO} [Result]
ioTest = do
[Ok "Success"]
lib.ioAndExceptionTestInLib : '{IO, Exception} [Result]
lib.ioAndExceptionTestInLib = do
[Ok "Success"]
```
Run a IO tests one by one
2023-12-13 23:30:29 +03:00
``` ucm
scratch/main> io.test ioAndExceptionTest
2023-12-13 23:30:29 +03:00
New test results:
1. ioAndExceptionTest ◉ Success
2023-12-13 23:30:29 +03:00
✅ 1 test(s) passing
2024-06-26 23:01:36 +03:00
Tip: Use view 1 to view the source of a test.
2023-12-13 23:30:29 +03:00
scratch/main> io.test ioTest
2023-12-13 23:30:29 +03:00
New test results:
1. ioTest ◉ Success
2023-12-13 23:30:29 +03:00
✅ 1 test(s) passing
2024-06-26 23:01:36 +03:00
Tip: Use view 1 to view the source of a test.
2023-12-13 23:30:29 +03:00
```
`io.test` doesn't cache results
``` ucm
scratch/main> io.test ioAndExceptionTest
2023-12-13 23:30:29 +03:00
New test results:
1. ioAndExceptionTest ◉ Success
2023-12-13 23:30:29 +03:00
✅ 1 test(s) passing
2024-06-26 23:01:36 +03:00
Tip: Use view 1 to view the source of a test.
2023-12-13 23:30:29 +03:00
```
`io.test.all` will run all matching tests except those in the `lib` namespace.
``` ucm
scratch/main> io.test.all
2023-12-13 23:30:29 +03:00
New test results:
1. ioAndExceptionTest ◉ Success
2. ioTest ◉ Success
2023-12-13 23:30:29 +03:00
2023-12-14 21:20:06 +03:00
✅ 2 test(s) passing
2023-12-13 23:30:29 +03:00
2024-06-26 23:01:36 +03:00
Tip: Use view 1 to view the source of a test.
2023-12-13 23:30:29 +03:00
```