parse list expressions without extra semicolon

This commit is contained in:
Gokcehan committed 2016-10-15 15:56:53 +03:00
1 parent 692e9116bf
commit cecd3f9904
3 files changed
+16 -4

No files matched your search

+12
View File
@@ -131,6 +131,18 @@ var gTests = []struct {
[]Expr{&MapExpr{"u", &CallExpr{"usage", []string{"/"}}}},
},
{
"map ss :set sortby size; set showinfo size",
[]string{"map", "ss", ":", "set", "sortby", "size", ";", "set", "showinfo", "size", "\n", "\n"},
[]Expr{&MapExpr{"ss", &ListExpr{[]Expr{&SetExpr{"sortby", "size"}, &SetExpr{"showinfo", "size"}}}}},
},
{
"map ss :set sortby size; set showinfo size;",
[]string{"map", "ss", ":", "set", "sortby", "size", ";", "set", "showinfo", "size", ";", "\n"},
[]Expr{&MapExpr{"ss", &ListExpr{[]Expr{&SetExpr{"sortby", "size"}, &SetExpr{"showinfo", "size"}}}}},
},
{
`cmd gohome :{{
cd ~