nushell/crates/nu-test-support/src
Stefan Holderbach 4aa9102523
Simplify nu! test macros. (#10403)
# Description
Unify the logic between `nu!` and `nu_with_std!`.
The inner code actually does not contain any variadic components. So it
can safely be abstracted into a function.
Similarly simplify the variadic to an array in `nu_with_plugin!`

This also seems to simplify the codegen for tests.

Comparing the size of the `/target/debug` folder after running:

```sh
cargo clean --profile dev
cargo build --workspace --tests
```

With this branch a reduction from `8.9GB` to `8.7GB`

# User-Facing Changes
None

# Tests + Formatting
No changes necessary
2023-09-21 20:11:56 +02:00
..
playground Deref &String arguments to &str where appropriate (#10321) 2023-09-12 14:06:56 +08:00
commands.rs Fix unit tests on Android (#10224) 2023-09-05 20:17:34 +12:00
fs.rs Fix unit tests on Android (#10224) 2023-09-05 20:17:34 +12:00
lib.rs Document fn pipeline() used with nu! tests (#9609) 2023-07-05 13:19:54 +02:00
locale_override.rs Remove once_cell dependency from nu-test-support create. (#8568) 2023-03-22 19:36:52 +01:00
macros.rs Simplify nu! test macros. (#10403) 2023-09-21 20:11:56 +02:00
playground.rs Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00