Skip to content

Commit

Permalink
Demonstrate an unrecognized indirect modifier
Browse files Browse the repository at this point in the history
  • Loading branch information
rillig committed Sep 14, 2024
1 parent 2c09a96 commit cdd45cd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions v23/mklexer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,6 @@ func (s *Suite) Test_MkLexer_Expr(c *check.C) {
testRest(input, expectedToken, "", diagnostics...)
}

t.Use(testRest, test, expr, exprText)

test("${VARIABLE}",
expr("VARIABLE"))

Expand Down Expand Up @@ -416,6 +414,13 @@ func (s *Suite) Test_MkLexer_Expr(c *check.C) {

test("${:!command!:Q}",
expr("", "!command!", "Q"))

test("${_BUILD_DEFS.${v}:U${${v}}:${_BUILD_INFO_MOD.${v}}:Q}",
b.ExprTextToken(
"${_BUILD_DEFS.${v}:U${${v}}:${_BUILD_INFO_MOD.${v}}:Q}",
// FIXME: The indirect modifier is missing.
"_BUILD_DEFS.${v}", "U${${v}}", "Q"),
"WARN: Test_MkLexer_Expr.mk:1: Invalid variable modifier \"${_BUILD_INFO_MOD.${v}}\" for \"_BUILD_DEFS.${v}\".")
}

// Pkglint can replace $(VAR) with ${VAR}. It doesn't look at all components
Expand Down

0 comments on commit cdd45cd

Please sign in to comment.