diff --git a/t_parser_test.go b/t_parser_test.go index f621502..0ae7839 100644 --- a/t_parser_test.go +++ b/t_parser_test.go @@ -135,6 +135,12 @@ func TestGeneralParser(t *testing.T) { /* 121 */ {`1+1|2+0.5`, float64(2), nil}, /* 122 */ {`1.2()`, newFraction(6, 5), nil}, /* 123 */ {`1|(2-2)`, nil, `division by zero`}, + /* 124 */ {`x="abc"; x ?! #x`, int64(3), nil}, + /* 125 */ {`x ?! #x`, nil, `[1:7] prefix/postfix operator "#" do not support operand '' [nil]`}, + /* 126 */ {`x ?! (x+1)`, nil, nil}, + /* 127 */ {`"abx" ?! (x+1)`, nil, `[1:6] left operand of "?!" must be a variable`}, + /* 128 */ {`"abx" ?? "pqr"`, nil, `[1:6] left operand of "??" must be a variable`}, + /* 129 */ {`"abx" ?= "pqr"`, nil, `[1:6] left operand of "?=" must be a variable`}, } // t.Setenv("EXPR_PATH", ".")