Merge "genrule: expand $$ to $$" am: d328ad708e am: a14071cf6c

am: 88c9ef3737

Change-Id: I65995c5cbf450910e6219089a993e94fa360bb22
This commit is contained in:
Colin Cross 2016-11-23 03:45:23 +00:00 committed by android-build-merger
commit ff88568e43
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 )") return "", len(s), fmt.Errorf("missing )")
case '$': case '$':
return s[0:1], 1, nil return "$$", 1, nil
default: default:
i := strings.IndexFunc(s, unicode.IsSpace) i := strings.IndexFunc(s, unicode.IsSpace)
if i == 0 { if i == 0 {

View file

@ -85,19 +85,19 @@ var expandTestCases = []struct {
}, },
{ {
in: "$$", in: "$$",
out: "$", out: "$$",
}, },
{ {
in: "$$(var1)", in: "$$(var1)",
out: "$(var1)", out: "$$(var1)",
}, },
{ {
in: "$$$(var1)", in: "$$$(var1)",
out: "$abc", out: "$$abc",
}, },
{ {
in: "$(var1)$$", in: "$(var1)$$",
out: "abc$", out: "abc$$",
}, },
{ {
in: "$(💩)", in: "$(💩)",