Add 'overlay new' command (#5647)

* Add 'overlay new' command

* Add missing file
This commit is contained in:
Jakub Žádník
2022-05-26 17:47:04 +03:00
committed by GitHub
parent 0594f9e7aa
commit 2042f7f769
5 changed files with 181 additions and 0 deletions

View File

@ -496,3 +496,14 @@ fn reset_overrides() {
assert_eq!(actual.out, "foo");
assert_eq!(actual_repl.out, "foo");
}
#[test]
fn overlay_new() {
let inp = &[r#"overlay new spam"#, r#"overlay list | last"#];
let actual = nu!(cwd: "tests/overlays", pipeline(&inp.join("; ")));
let actual_repl = nu_repl("tests/overlays", inp);
assert_eq!(actual.out, "spam");
assert_eq!(actual_repl.out, "spam");
}