mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Assure semi-colon chaining on same line works
This commit is contained in:
@@ -332,6 +332,21 @@ func TestOptionalSemicolons(t *testing.T) {
|
||||
expect(t, lx, expectedItems)
|
||||
}
|
||||
|
||||
func TestSemicolonChaining(t *testing.T) {
|
||||
expectedItems := []item{
|
||||
{itemKey, "foo", 1},
|
||||
{itemString, "1", 1},
|
||||
{itemKey, "bar", 1},
|
||||
{itemFloat, "2.2", 1},
|
||||
{itemKey, "baz", 1},
|
||||
{itemBool, "true", 1},
|
||||
{itemEOF, "", 1},
|
||||
}
|
||||
|
||||
lx := lex("foo='1'; bar=2.2; baz=true;")
|
||||
expect(t, lx, expectedItems)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user