Skip to content

Commit

Permalink
[parser] Add test case about format "a % b" (pingcap#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
hicqu authored and ti-chi-bot committed Oct 9, 2021
1 parent b9e1bf0 commit c7db323
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions parser/ast/format_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ func (ts *testAstFormatSuite) TestAstFormat(c *C) {
{`"abc" not regexp '.*bc?'`, `"abc" NOT REGEXP ".*bc?"`},
{`- 4`, `-4`},
{`- ( - 4 ) `, `-(-4)`},
{`a%b`, "`a` % `b`"},
{`a%b+6`, "`a` % `b` + 6"},
{`a%(b+6)`, "`a` % (`b` + 6)"},
// Functions.
{` json_extract ( a,'$.b',"$.\"c d\"" ) `, "json_extract(`a`, \"$.b\", \"$.\\\"c d\\\"\")"},
{` length ( a )`, "length(`a`)"},
Expand Down

0 comments on commit c7db323

Please sign in to comment.