2023-12-13 23:30:29 +03:00
|
|
|
The `io.test` command should run all of the tests within the current namespace, excluding libs.
|
|
|
|
|
2024-07-10 17:46:18 +03:00
|
|
|
``` 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"]
|
|
|
|
```
|
|
|
|
|
2024-07-10 17:46:18 +03:00
|
|
|
Run a IO tests one by one
|
2023-12-13 23:30:29 +03:00
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> io.test ioAndExceptionTest
|
2023-12-13 23:30:29 +03:00
|
|
|
|
|
|
|
New test results:
|
|
|
|
|
2024-06-27 08:14:37 +03:00
|
|
|
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
|
|
|
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> io.test ioTest
|
2023-12-13 23:30:29 +03:00
|
|
|
|
|
|
|
New test results:
|
|
|
|
|
2024-06-27 08:14:37 +03:00
|
|
|
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
|
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> io.test ioAndExceptionTest
|
2023-12-13 23:30:29 +03:00
|
|
|
|
|
|
|
New test results:
|
|
|
|
|
2024-06-27 08:14:37 +03:00
|
|
|
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.
|
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> io.test.all
|
2023-12-13 23:30:29 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
New test results:
|
|
|
|
|
2024-06-27 08:14:37 +03:00
|
|
|
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
|
|
|
|
|
|
|
```
|