Commit Graph

9 Commits

Author SHA1 Message Date
est31
cf0efb811e Trim trailing whitespace and set it in editorconfig 2019-09-03 02:52:52 +02:00
Andrés N. Robalino
9810df25b4 Readability improvement. 2019-08-29 01:31:56 -05:00
Andrés N. Robalino
55fb1f8dda Yo quiero Playground taconushell. 2019-08-28 19:32:42 -05:00
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
Andrés N. Robalino
75e3c6f547 copies_expected -> expected. Use expected as test dirname expectation outcomes from now on. 2019-08-14 16:05:35 -05:00
Andrés N. Robalino
278de0e517 cp refactoring. 2019-08-14 15:29:05 -05:00
Andrés N. Robalino
5bfa2cc4b8 cp wildcard already supported (documented with test) 2019-08-10 04:32:27 -05:00
Andrés N. Robalino
e0bacaaf37 clean up. more cp. mkdir. more test coverage. fixes.
- Introduced mkdir.
- Minor more labelled error improvements.
- Fix to avoid leaking child zombies.
- cp improvements.
- Introduced mkdir.
2019-08-07 13:28:46 -05:00
Andrés N. Robalino
1b7dd52713 Tests pass. 2019-08-07 13:23:02 -05:00