more tests
This commit is contained in:
parent
6398f0e31e
commit
c3712f4337
|
@ -114,6 +114,16 @@ fn literal_float() {
|
||||||
test_eval("1.5", Eq("1.5"))
|
test_eval("1.5", Eq("1.5"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn literal_filesize() {
|
||||||
|
test_eval("30MiB", Eq("30.0 MiB"))
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn literal_duration() {
|
||||||
|
test_eval("30ms", Eq("30ms"))
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn literal_binary() {
|
fn literal_binary() {
|
||||||
test_eval("0x[1f 2f f0]", Matches("Length.*1f.*2f.*f0"))
|
test_eval("0x[1f 2f f0]", Matches("Length.*1f.*2f.*f0"))
|
||||||
|
@ -443,3 +453,14 @@ fn row_condition() {
|
||||||
Eq("[[a, b]; [1, 2]]"),
|
Eq("[[a, b]; [1, 2]]"),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn custom_command() {
|
||||||
|
test_eval(
|
||||||
|
r#"
|
||||||
|
def cmd [a: int, b: string = 'fail', ...c: string, --x: int] { $"($a)($b)($c)($x)" }
|
||||||
|
cmd 42 pass foo --x 30
|
||||||
|
"#,
|
||||||
|
Eq("42pass[foo]30"),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user