mirror of
https://github.com/nushell/nushell.git
synced 2026-11-22 17:27:05 +08:00
## Description - Enabled `pretty_assertions`'s `unstable` feature to get `assert_matches!` (the stdlib version is available in 1.96) - Tried to keep most tests 1:1, though I made some significant changes here and there. ## User-facing changes (Release notes) N/A --------- Co-authored-by: Tim 'Piepmatz' Hesse <git+github@cptpiepmatz.de>
10 lines
218 B
Rust
10 lines
218 B
Rust
use nu_test_support::prelude::*;
|
|
|
|
#[test]
|
|
fn mut_variable() -> Result {
|
|
let mut tester = test();
|
|
let () = tester.run("mut x = 0")?;
|
|
let () = tester.run("$x = 1")?;
|
|
tester.run("$x").expect_value_eq(1)
|
|
}
|