Merge "genrule: expand $$ to $$"

This commit is contained in:
Treehugger Robot
2016-11-23 03:37:58 +00:00
committed by Gerrit Code Review
2 changed files with 5 additions and 5 deletions

View File

@@ -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 {

View File

@@ -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: "$(💩)",