2
0
Fork 0
mirror of https://github.com/nushell/nushell synced 2025-01-19 16:44:46 +00:00
nushell/tests/shell/repl.rs
Ian Manske 03667bdf8c
Fix merging child stack into parent ()
# Description
Fixes  where changes to mutable variables are not properly
persisted after a REPL entry.
2024-04-06 15:03:22 +00:00

9 lines
230 B
Rust

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");
}