nushell/tests
Yehuda Katz 21ad06b1e1 Remove unwraps and clean up playground
The original intent of this patch was to remove more unwraps to reduce
panics. I then lost a ton of time to the fact that the playground isn't
in a temp directory (because of permissions issues on Windows).

This commit improves the test facilities to:

- use a tempdir for the playground
- change the playground API so you instantiate it with a block that
  encloses the lifetime of the tempdir
- the block is called with a `dirs` argument that has `dirs.test()` and
  other important directories that we were computing by hand all the time
- the block is also called with a `playground` argument that you can use
  to construct files (it's the same `Playground` as before)
- change the nu! and nu_error! macros to produce output instead of
  taking a variable binding
- change the nu! and nu_error! macros to do the cwd() transformation
  internally
- change the nu! and nu_error! macros to take varargs at the end that
  get interpolated into the running command

I didn't manage to finish porting all of the tests, so a bunch of tests
are currently commented out. That will need to change before we land
this patch.
2019-08-28 10:01:16 -07:00
..
fixtures Improve test so that it should work on Windows 2019-08-26 21:26:49 -04:00
helpers Remove unwraps and clean up playground 2019-08-28 10:01:16 -07:00
command_cd_tests.rs Remove unwraps and clean up playground 2019-08-28 10:01:16 -07:00
command_cp_tests.rs Remove unwraps and clean up playground 2019-08-28 10:01:16 -07:00
command_enter_test.rs Remove unwraps and clean up playground 2019-08-28 10:01:16 -07:00
command_ls_tests.rs Remove unwraps and clean up playground 2019-08-28 10:01:16 -07:00
command_mkdir_tests.rs Remove unwraps and clean up playground 2019-08-28 10:01:16 -07:00
command_mv_tests.rs Remove unwraps and clean up playground 2019-08-28 10:01:16 -07:00
command_open_tests.rs Remove unwraps and clean up playground 2019-08-28 10:01:16 -07:00
command_rm_tests.rs Remove unwraps and clean up playground 2019-08-28 10:01:16 -07:00
commands_test.rs Remove unwraps and clean up playground 2019-08-28 10:01:16 -07:00
external_tests.rs Remove unwraps and clean up playground 2019-08-28 10:01:16 -07:00
filter_inc_tests.rs Remove unwraps and clean up playground 2019-08-28 10:01:16 -07:00
filter_str_tests.rs Remove unwraps and clean up playground 2019-08-28 10:01:16 -07:00
filters_test.rs Remove unwraps and clean up playground 2019-08-28 10:01:16 -07:00
tests.rs Remove unwraps and clean up playground 2019-08-28 10:01:16 -07:00