mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 08:34:33 +00:00
add test
This commit is contained in:
parent
737fb6b60d
commit
03d0fa524c
1 changed files with 21 additions and 0 deletions
|
@ -2782,3 +2782,24 @@ fn value_not_exposed_hits_panic() {
|
|||
i64
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn mix_function_and_closure() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
app "test" provides [ main ] to "./platform"
|
||||
|
||||
foo = \x -> x
|
||||
|
||||
bar = \y -> \_ -> y
|
||||
|
||||
main : Str
|
||||
main =
|
||||
(if 1 == 1 then foo else (bar "nope nope nope")) "hello world"
|
||||
"#
|
||||
),
|
||||
RocStr::from_slice(b"hello world"),
|
||||
RocStr
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue