Merge "genrule: expand $$ to $$" am: d328ad708e
am: a14071cf6c
am: 88c9ef3737
Change-Id: I65995c5cbf450910e6219089a993e94fa360bb22
This commit is contained in:
commit
ff88568e43
2 changed files with 5 additions and 5 deletions
|
@ -57,7 +57,7 @@ func getMapping(s string, mapping func(string) (string, error)) (string, int, er
|
|||
}
|
||||
return "", len(s), fmt.Errorf("missing )")
|
||||
case '$':
|
||||
return s[0:1], 1, nil
|
||||
return "$$", 1, nil
|
||||
default:
|
||||
i := strings.IndexFunc(s, unicode.IsSpace)
|
||||
if i == 0 {
|
||||
|
|
|
@ -85,19 +85,19 @@ var expandTestCases = []struct {
|
|||
},
|
||||
{
|
||||
in: "$$",
|
||||
out: "$",
|
||||
out: "$$",
|
||||
},
|
||||
{
|
||||
in: "$$(var1)",
|
||||
out: "$(var1)",
|
||||
out: "$$(var1)",
|
||||
},
|
||||
{
|
||||
in: "$$$(var1)",
|
||||
out: "$abc",
|
||||
out: "$$abc",
|
||||
},
|
||||
{
|
||||
in: "$(var1)$$",
|
||||
out: "abc$",
|
||||
out: "abc$$",
|
||||
},
|
||||
{
|
||||
in: "$(💩)",
|
||||
|
|
Loading…
Reference in a new issue