Skip to content

Commit

Permalink
Added more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
amolnayak311 committed Feb 2, 2022
1 parent db8957e commit 85131ef
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ class ParserSpec extends AnyFunSpec with Matchers {
parseError("foo{a*\"b\"}")
parseError("foo{a>=\"b\"}")

parseSuccessfully("{__name__=\"foo\"}")
parseSuccessfully("{_metric_=\"foo\"}")
parseError("foo::b{gibberish}")
parseError("foo{1}")
parseError("{}")
Expand Down Expand Up @@ -731,6 +733,7 @@ class ParserSpec extends AnyFunSpec with Matchers {
("""{__name__="foo"}""" -> Map("__name__" -> "foo")),
("""{__name__="foo", bar="baz"}""" -> Map("__name__" -> "foo", "bar" -> "baz")),
("""{bar="baz"}""" -> Map("bar" -> "baz")),
"""{_metric_="foo"}""" -> Map("_metric_" -> "foo"), // not same as """{__name__="foo"}"""
("""foo{bar="baz", bog="bah"}""" -> Map("__name__" -> "foo", "bar" -> "baz", "bog" -> "bah")),
)

Expand Down

0 comments on commit 85131ef

Please sign in to comment.