internal/rosa/azalea: additional test
This commit is contained in:
@@ -80,6 +80,40 @@ func TestParse(t *testing.T) {
|
|||||||
},
|
},
|
||||||
}},
|
}},
|
||||||
}}, nil},
|
}}, nil},
|
||||||
|
{"mixed semicolons and newlines", `
|
||||||
|
f {
|
||||||
|
a = 4;
|
||||||
|
b = 2
|
||||||
|
c = [
|
||||||
|
a,
|
||||||
|
b
|
||||||
|
c
|
||||||
|
d, e
|
||||||
|
]
|
||||||
|
d = {
|
||||||
|
"a": b;
|
||||||
|
"c": d
|
||||||
|
}; e = 2
|
||||||
|
}`,
|
||||||
|
[]any{Func{
|
||||||
|
Ident: Ident("f"),
|
||||||
|
Args: []Arg{
|
||||||
|
{K: []Ident{Ident("a")}, V: Val{Int(4)}},
|
||||||
|
{K: []Ident{Ident("b")}, V: Val{Int(2)}},
|
||||||
|
{K: []Ident{Ident("c")}, V: Val{Array{
|
||||||
|
Val{Ident("a")},
|
||||||
|
Val{Ident("b")},
|
||||||
|
Val{Ident("c")},
|
||||||
|
Val{Ident("d")},
|
||||||
|
Val{Ident("e")},
|
||||||
|
}}},
|
||||||
|
{K: []Ident{Ident("d")}, V: Val{[]KV{
|
||||||
|
{K: String("a"), V: Val{Ident("b")}},
|
||||||
|
{K: String("c"), V: Val{Ident("d")}},
|
||||||
|
}}},
|
||||||
|
{K: []Ident{Ident("e")}, V: Val{Int(2)}},
|
||||||
|
},
|
||||||
|
}}, nil},
|
||||||
{"gcc", gccSample, []any{Func{
|
{"gcc", gccSample, []any{Func{
|
||||||
Ident: Ident("gcc"),
|
Ident: Ident("gcc"),
|
||||||
Package: true,
|
Package: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user