nushell/tests
Antoine Stevan 8403fff345
allow print to take data as input again (#9823)
related to
https://discord.com/channels/601130461678272522/601130461678272524/1134079115134251129

# Description
before 0.83.0, `print` used to allow piping data into it, e.g.
```nushell
"foo" | print
```
instead of 
```nushell
print "foo"
```

this PR enables the `any -> nothing` input / output type to allow this
again.

i've double checked and `print` is essentially the following snippet
```rust
        if !args.is_empty() {
            for arg in args {
                arg.into_pipeline_data()
                    .print(engine_state, stack, no_newline, to_stderr)?;
            }
        } else if !input.is_nothing() {
            input.print(engine_state, stack, no_newline, to_stderr)?;
        }
```
1. the first part is for `print a b c`
2. the second part is for `"foo" | print`

# User-Facing Changes
```nushell
"foo" | print
```
works again

# Tests + Formatting
- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
-  `toolkit test`
-  `toolkit test stdlib`

# After Submitting

---------

Co-authored-by: sholderbach <sholderbach@users.noreply.github.com>
2023-07-27 21:40:25 +02:00
..
assets/nu_json Preserve order when serializing/deserialize json by default. (#3126) 2021-03-04 01:35:13 -05:00
const_ Fix broken constants in scopes (#9679) 2023-07-14 00:02:05 +03:00
eval Remove unnecessary cwd, pipeline(), r# from various tests (#9645) 2023-07-12 19:07:20 +02:00
fixtures Disable pipeline echo (#8292) 2023-03-17 11:53:46 +13:00
hooks Remove unnecessary cwd, pipeline(), r# from various tests (#9645) 2023-07-12 19:07:20 +02:00
modules Remove unnecessary cwd, pipeline(), r# from various tests (#9645) 2023-07-12 19:07:20 +02:00
overlays Remove unnecessary cwd, pipeline(), r# from various tests (#9645) 2023-07-12 19:07:20 +02:00
parsing Remove unnecessary cwd, pipeline(), r# from various tests (#9645) 2023-07-12 19:07:20 +02:00
path Use pretty_assertions in the root crate (#8818) 2023-04-08 11:52:37 -07:00
plugins Disallow empty record with empty key,value pairs on ini format (#9722) 2023-07-18 22:14:18 +02:00
scope Remove unnecessary cwd, pipeline(), r# from various tests (#9645) 2023-07-12 19:07:20 +02:00
shell allow print to take data as input again (#9823) 2023-07-27 21:40:25 +02:00
main.rs prevent redefining fields in a record (#8705) 2023-04-02 06:09:33 +12:00