Skip to content

Commit

Permalink
Add more tests for redundant parentheses
Browse files Browse the repository at this point in the history
  • Loading branch information
rillig committed Jan 20, 2024
1 parent 76efe50 commit 62dcce3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions v23/mkcondchecker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,16 @@ func (s *Suite) Test_MkCondChecker_checkRedundantParentheses(c *check.C) {
test(
".if (1) || 2",
nil...)

test(
".if (!0)",
"NOTE: filename.mk:2: Parentheses "+
"around the outermost condition are redundant.")

test(
".if (!empty(${VARNAME:L}:Mpattern))",
"NOTE: filename.mk:2: Parentheses "+
"around the outermost condition are redundant.")
}

func (s *Suite) Test_MkCondChecker_checkAnd(c *check.C) {
Expand Down

0 comments on commit 62dcce3

Please sign in to comment.