Update tests

This commit is contained in:
Sam Mohr 2025-01-17 19:10:20 -08:00
parent 1a9668e83a
commit b8de09d048
No known key found for this signature in database
GPG key ID: EA41D161A3C1BC99
61 changed files with 757 additions and 720 deletions

View file

@ -1,3 +1,3 @@
when x is
Foo.and -> 1
Foo.val -> 1
_ -> 4

View file

@ -9,7 +9,7 @@
patterns: [
@14-21 SpaceBefore(
Malformed(
"Foo.and",
"Foo.val",
),
[
Newline,

View file

@ -1,3 +1,3 @@
when x is
Foo.and -> 1
Foo.val -> 1
_ -> 4

View file

@ -0,0 +1,20 @@
expect
html : Html {}
html =
Element "a" 43 [HtmlAttr "href" "https://www.roc-lang.org/"] [Text "Roc"]
actual : { nodes : List RenderedNode, siblingIds : List U64 }
actual =
indexNodes { nodes: [], siblingIds: [] } html
expected : { nodes : List RenderedNode, siblingIds : List U64 }
expected = {
nodes: [
RenderedText "Roc",
RenderedElement "a" { emptyRenderedAttrs & htmlAttrs: Dict.fromList [("href", "https://www.roc-lang.org/")] } [0],
],
siblingIds: [1],
}
(actual.nodes == expected.nodes)
and (actual.siblingIds == expected.siblingIds)

View file

@ -1,4 +1,4 @@
my_var =
some_var # c
|| other_thing # ^D
or other_thing # ^D
final_expr