dust/tests/commands.rs

15 lines
279 B
Rust
Raw Normal View History

use dust_lang::{interpret, Value};
#[test]
fn simple_command() {
assert_eq!(interpret("^echo hi"), Ok(Value::string("hi\n")))
}
#[test]
fn assign_command_output() {
assert_eq!(
2024-02-18 16:38:35 +00:00
interpret("x = ^ls; length(str:lines(x))"),
Ok(Value::Integer(11))
);
}