mirror of
https://github.com/nushell/nushell.git
synced 2025-08-27 19:43:51 +02:00
Fix merging child stack into parent (#12426)
# Description Fixes #12423 where changes to mutable variables are not properly persisted after a REPL entry.
This commit is contained in:
9
tests/shell/repl.rs
Normal file
9
tests/shell/repl.rs
Normal file
@@ -0,0 +1,9 @@
|
||||
use nu_test_support::{nu, nu_repl_code};
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
#[test]
|
||||
fn mut_variable() {
|
||||
let lines = &["mut x = 0", "$x = 1", "$x"];
|
||||
let actual = nu!(nu_repl_code(lines));
|
||||
assert_eq!(actual.out, "1");
|
||||
}
|
Reference in New Issue
Block a user