diff --git a/README.md b/README.md index affcd8a..45739a8 100644 --- a/README.md +++ b/README.md @@ -184,6 +184,7 @@ Available recipes: run # [alias: ru] runtest # [alias: rt] test # [alias: t] + testcapture # [alias: tc] ``` The following have different **recipes** for **macos** and **linux** @@ -217,7 +218,6 @@ BIN_APP_PATH := "/usr/local/bin" > [Command-line-options](#options) can be added > RUST_LOG environment variable controls env_logger output - | Recipe | alias | Descripción | parameters | |--------|-------|--------------|--------------------| | **build** | b | run cargo | cargo arguments | @@ -228,9 +228,30 @@ BIN_APP_PATH := "/usr/local/bin" | **clean** | cl | run cargo clean | cargo arguments | | **doc** | d | run cargo doc --open --no-deps | cargo arguments | | **benchmark** | be | run cargo bench | cargo arguments | -| **test*** | be | run cargo t | cargo arguments | +| **test*** | t | run cargo t | cargo arguments | +| **testcapure*** | tc | run cargo t -- --nocapture | cargo arguments | | **runtest** | rt | run [run.sh](run.sh) script using [test](test) directories for **SOURCE** and **DEST** parametets
add [Command-line-options](#options) | | +--- + +### For tests + +> [!NOTE] +> The logger can only be initialized once per process
+> Test by default runs in parallel + +Use **--nocapture** to see the output even when tests pass + +The **RUST_LOG** environment variable controls what gets logged + +Log files are automatically cleaned up when the **TempDir** is dropped + +The recommended way to test logging functionality: +- create a temporary log file +- write some messages +- verify their presence in the log + + ## To work on app | Recipe | alias | Descripción | parameters |