2024-10-08 23:23:34 +03:00
|
|
|
``` ucm :hide
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> builtins.merge
|
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-10-08 23:23:34 +03:00
|
|
|
``` unison :hide
|
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]
|
2024-10-08 23:23:34 +03:00
|
|
|
ioAndExceptionTest = do
|
2023-12-13 23:30:29 +03:00
|
|
|
[Ok "Success"]
|
|
|
|
|
|
|
|
ioTest : '{IO} [Result]
|
2024-10-08 23:23:34 +03:00
|
|
|
ioTest = do
|
2023-12-13 23:30:29 +03:00
|
|
|
[Ok "Success"]
|
|
|
|
|
|
|
|
lib.ioAndExceptionTestInLib : '{IO, Exception} [Result]
|
2024-10-08 23:23:34 +03:00
|
|
|
lib.ioAndExceptionTestInLib = do
|
2023-12-13 23:30:29 +03:00
|
|
|
[Ok "Success"]
|
|
|
|
```
|
|
|
|
|
2024-10-08 23:23:34 +03:00
|
|
|
``` ucm :hide
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> add
|
2023-12-13 23:30:29 +03:00
|
|
|
```
|
|
|
|
|
2024-10-08 23:23:34 +03:00
|
|
|
Run a IO tests one by one
|
2023-12-13 23:30:29 +03:00
|
|
|
|
2024-10-08 23:23:34 +03:00
|
|
|
``` ucm
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> io.test ioAndExceptionTest
|
|
|
|
scratch/main> io.test ioTest
|
2023-12-13 23:30:29 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
`io.test` doesn't cache results
|
|
|
|
|
2024-10-08 23:23:34 +03:00
|
|
|
``` ucm
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> io.test ioAndExceptionTest
|
2023-12-13 23:30:29 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
`io.test.all` will run all matching tests except those in the `lib` namespace.
|
|
|
|
|
2024-10-08 23:23:34 +03:00
|
|
|
``` ucm
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> io.test.all
|
2023-12-13 23:30:29 +03:00
|
|
|
```
|