mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
fix all gen and cli tests
This commit is contained in:
parent
e643d1ea3c
commit
f6aa77e6a8
4 changed files with 37 additions and 7 deletions
|
@ -2819,6 +2819,31 @@ mod test_parse {
|
|||
assert!(actual.is_ok());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn outdenting_newline_after_else() {
|
||||
use roc_parse::ast::Def::*;
|
||||
|
||||
let arena = Bump::new();
|
||||
|
||||
// highlights a problem with the else branch demanding a newline after its expression
|
||||
let src = indoc!(
|
||||
r#"
|
||||
main =
|
||||
v = \y -> if x then y else z
|
||||
|
||||
1
|
||||
"#
|
||||
);
|
||||
|
||||
let actual = module_defs()
|
||||
.parse(&arena, State::new(src.as_bytes(), Attempting::Module))
|
||||
.map(|tuple| tuple.1);
|
||||
|
||||
dbg!(&actual);
|
||||
|
||||
assert!(actual.is_ok());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn newline_after_equals() {
|
||||
// Regression test for https://github.com/rtfeldman/roc/issues/51
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue