nushell/crates/nu-command/tests/commands
Andrew Barnes 319930a1b9
Add streaming support to save for ExternalStream data (#4985)
* Add streaming support to save for ExternalStream data

Prior to this change, save would collect data from an ExternalStream (data
originating from externals) consuming memory for the full amount of data piped
to it,

This change adds streaming support for ExternalStream allowing saving of
arbitrarily large files and bounding memory usage.

* Remove broken save test

This test passes but not for the right reasons, since this test was
written filename has become a required parameter.  The parser outputs
an error but the test still passes as is checking the original un-mutated
file assuming save has re-written the contents.

This change removes the test.

```
running 1 test
=== stderr
Error: nu::parser::missing_positional (https://docs.rs/nu-parser/0.60.0/nu-parser/enum.ParseError.html#variant.MissingPositional)

  × Missing required positional argument.
   ╭─[source:1:1]
 1 │ open save_test_1/cargo_sample.toml | save
   ·                                          ▲
   ·                                          ╰── missing filename
   ╰────
  help: Usage: save {flags} <filename>

test commands::save::figures_out_intelligently_where_to_write_out_with_metadata ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 515 filtered out; finished in 0.10s
```
2022-03-27 15:39:27 +13:00
..
hash_ fix typo, update some examples and regenerate docs (#4718) 2022-03-04 06:10:09 -06:00
keep Strip trailing whitespace in files (#4575) 2022-02-21 08:38:15 -05:00
math Fix operator precedence parser (#4947) 2022-03-25 16:23:08 +13:00
move_ fixed some more tests (#4607) 2022-02-22 11:32:29 -05:00
path Fix path join on streams (#4959) 2022-03-26 07:46:48 +13:00
random Another batch of command tests (#4496) 2022-02-16 07:38:02 -05:00
skip Strip trailing whitespace in files (#4575) 2022-02-21 08:38:15 -05:00
str_ Experiment: Allow both $true/true and $false/false (#4696) 2022-03-02 19:55:03 -05:00
alias.rs Allow expanding aliases before keywords, improve hiding (#4858) 2022-03-18 11:35:50 +13:00
all.rs Strip trailing whitespace in files (#4575) 2022-02-21 08:38:15 -05:00
any.rs Strip trailing whitespace in files (#4575) 2022-02-21 08:38:15 -05:00
append.rs Strip trailing whitespace in files (#4575) 2022-02-21 08:38:15 -05:00
cal.rs Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
cd.rs Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
compact.rs Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
cp.rs add --perf cli param (#4391) 2022-02-09 16:08:16 -06:00
def.rs fixed some more tests (#4607) 2022-02-22 11:32:29 -05:00
default.rs Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
drop.rs fixed a couple more tests (#4870) 2022-03-18 12:35:28 -05:00
each.rs Simplify group/window into their own commands (#4760) 2022-03-06 20:01:29 -05:00
echo.rs Require block params (#4505) 2022-02-17 06:40:24 -05:00
empty.rs fix typo, update some examples and regenerate docs (#4718) 2022-03-04 06:10:09 -06:00
enter.rs Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
every.rs Another batch of command tests (#4496) 2022-02-16 07:38:02 -05:00
find.rs Use 'table' on scripts and -c commands (#4377) 2022-02-09 05:58:54 -05:00
first.rs Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
flatten.rs fixed some more tests (#4607) 2022-02-22 11:32:29 -05:00
format.rs Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
get.rs a few more tests (#4488) 2022-02-15 20:48:32 -05:00
group_by.rs more test fixes (#4499) 2022-02-16 12:24:45 -06:00
headers.rs refactor: change column names from 'Column*' to 'column*' (#4556) 2022-02-19 19:26:47 -05:00
help.rs Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
histogram.rs Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
insert.rs Add insert/update to lists (#4873) 2022-03-19 10:12:54 +13:00
into_filesize.rs Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
into_int.rs Require block params (#4505) 2022-02-17 06:40:24 -05:00
last.rs Use 'table' on scripts and -c commands (#4377) 2022-02-09 05:58:54 -05:00
length.rs Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
lines.rs refactor: change column names from 'Column*' to 'column*' (#4556) 2022-02-19 19:26:47 -05:00
ls.rs Require block params (#4505) 2022-02-17 06:40:24 -05:00
merge.rs Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
mkdir.rs Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
mod.rs Allow expanding aliases before keywords, improve hiding (#4858) 2022-03-18 11:35:50 +13:00
open.rs more test fixes (#4499) 2022-02-16 12:24:45 -06:00
parse.rs Add support for escape characters, make nuon a JSON superset (#4706) 2022-03-03 13:14:03 -05:00
prepend.rs Use 'table' on scripts and -c commands (#4377) 2022-02-09 05:58:54 -05:00
range.rs Use 'table' on scripts and -c commands (#4377) 2022-02-09 05:58:54 -05:00
reduce.rs Make reduce -n more sensible (#4791) 2022-03-09 05:56:08 -05:00
reject.rs Fix 4946 (#4951) 2022-03-25 20:48:01 +13:00
rename.rs Simplify empty?, improve default (#4797) 2022-03-09 08:46:28 -05:00
reverse.rs Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
rm.rs Fix single quote environment values (#4960) 2022-03-26 09:14:48 +13:00
roll.rs refactor: change column names from 'Column*' to 'column*' (#4556) 2022-02-19 19:26:47 -05:00
rotate.rs refactor: change column names from 'Column*' to 'column*' (#4556) 2022-02-19 19:26:47 -05:00
run_external.rs Fix external extra (#4777) 2022-03-07 20:17:33 -05:00
save.rs Add streaming support to save for ExternalStream data (#4985) 2022-03-27 15:39:27 +13:00
select.rs fixed some more tests (#4607) 2022-02-22 11:32:29 -05:00
semicolon.rs Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
sort_by.rs fixed a couple more tests (#4870) 2022-03-18 12:35:28 -05:00
source.rs fixed a couple more tests (#4870) 2022-03-18 12:35:28 -05:00
split_by.rs Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
split_column.rs refactor: change column names from 'Column*' to 'column*' (#4556) 2022-02-19 19:26:47 -05:00
split_row.rs Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
touch.rs Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
uniq.rs more test fixes (#4499) 2022-02-16 12:24:45 -06:00
update.rs Add insert/update to lists (#4873) 2022-03-19 10:12:54 +13:00
upsert.rs Add insert and update back (#4864) 2022-03-18 06:55:02 +13:00
use_.rs Fix Windows doc comments (#4643) 2022-02-25 13:03:39 -05:00
where_.rs Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
which.rs Don't assume external ls (#4925) 2022-03-24 16:42:41 +13:00
with_env.rs fixed some more tests (#4607) 2022-02-22 11:32:29 -05:00
wrap.rs Use 'table' on scripts and -c commands (#4377) 2022-02-09 05:58:54 -05:00
zip.rs rename update to upsert to mirror what it really does (#4859) 2022-03-16 19:13:34 -05:00