Add Nushell REPL simulator; Fix bug in overlay add (#5478)

* Add Nushell REPL simulator; Fix bug in overlay add

The `nu_repl` function takes an array of strings and processes them as
if they were REPL lines entered one by one. This helps to discover bugs
due to the state changes between the parse and eval stages.

* Fix REPL tests on Windows
This commit is contained in:
Jakub Žádník
2022-05-08 16:09:39 +03:00
committed by GitHub
parent 061e9294b3
commit 07ac3c3aab
5 changed files with 354 additions and 187 deletions

View File

@ -211,8 +211,8 @@ pub fn eval_source(
(output, working_set.render())
};
let cwd = match nu_engine::env::current_dir_str(engine_state, stack) {
Ok(p) => PathBuf::from(p),
let cwd = match nu_engine::env::current_dir(engine_state, stack) {
Ok(p) => p,
Err(e) => {
let working_set = StateWorkingSet::new(engine_state);
report_error(&working_set, &e);