mirror of
https://github.com/nushell/nushell.git
synced 2025-08-14 12:49:04 +02:00
Add better comment skipping (#359)
This commit is contained in:
23
src/tests.rs
23
src/tests.rs
@ -1120,3 +1120,26 @@ fn config_var_2() -> TestResult {
|
||||
"40.0 KB",
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn comment_skipping_1() -> TestResult {
|
||||
run_test(
|
||||
r#"let x = {
|
||||
y: 20
|
||||
# foo
|
||||
}; $x.y"#,
|
||||
"20",
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn comment_skipping_2() -> TestResult {
|
||||
run_test(
|
||||
r#"let x = {
|
||||
y: 20
|
||||
# foo
|
||||
z: 40
|
||||
}; $x.z"#,
|
||||
"40",
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user