config: parse multi-args in interpolations [GH-282]

This commit is contained in:
Mitchell Hashimoto 2014-09-09 14:39:32 -07:00
parent 21472e98b8
commit c724f161c5
3 changed files with 16 additions and 2 deletions

View File

@ -13,6 +13,7 @@ BUG FIXES:
* core: `-no-color` flag properly disables color. [GH-250] * core: `-no-color` flag properly disables color. [GH-250]
* core: "~" is expanded in `-var-file` flags. [GH-273] * core: "~" is expanded in `-var-file` flags. [GH-273]
* core: Errors with tfvars are shown in console. [GH-269] * core: Errors with tfvars are shown in console. [GH-269]
* core: Interpolation function calls with more than two args parse. [GH-282]
* providers/aws: Refreshing EIP from pre-0.2 state file won't error. [GH-258] * providers/aws: Refreshing EIP from pre-0.2 state file won't error. [GH-258]
* providers/aws: Creating EIP without an instance/network won't fail. * providers/aws: Creating EIP without an instance/network won't fail.
* providers/aws: Refreshing EIP manually deleted works. * providers/aws: Refreshing EIP manually deleted works.

View File

@ -62,9 +62,9 @@ args:
{ {
$$ = nil $$ = nil
} }
| expr COMMA expr | args COMMA expr
{ {
$$ = append($$, $1, $3) $$ = append($1, $3)
} }
| expr | expr
{ {

View File

@ -88,6 +88,19 @@ func TestExprParse(t *testing.T) {
}, },
false, false,
}, },
{
`concat("foo","-","0.0/16")`,
&FunctionInterpolation{
Func: nil, // Funcs["lookup"]
Args: []Interpolation{
&LiteralInterpolation{Literal: "foo"},
&LiteralInterpolation{Literal: "-"},
&LiteralInterpolation{Literal: "0.0/16"},
},
},
false,
},
} }
for i, tc := range cases { for i, tc := range cases {