1
0
dust/tests/statements.rs
2024-03-08 12:24:11 -05:00

21 lines
360 B
Rust

use dust_lang::*;
#[test]
fn loops_and_breaks() {
assert_eq!(
interpret(
"
i = 0;
loop {
if i == 3 {
break 'foobar'
} else {
i += 1
}
}
"
),
Ok(Some(Value::string("foobar")))
)
}