aboutsummaryrefslogtreecommitdiff
path: root/expr_test.go
diff options
context:
space:
mode:
authorFumitoshi Ukai <fumitoshi.ukai@gmail.com>2015-06-30 16:51:27 +0900
committerFumitoshi Ukai <fumitoshi.ukai@gmail.com>2015-06-30 16:51:27 +0900
commitbbb0db5168c30b9effa24d4b82162fa1c350e124 (patch)
tree8082354c26469fff08d38197b25b70b99965a30a /expr_test.go
parentb64400e6833bcc91798395e8ce27a59ad25cde3b (diff)
downloadkati-bbb0db5168c30b9effa24d4b82162fa1c350e124.tar.gz
fix TODO in value.mk
Diffstat (limited to 'expr_test.go')
-rw-r--r--expr_test.go13
1 files changed, 11 insertions, 2 deletions
diff --git a/expr_test.go b/expr_test.go
index 75bc3d1..7a38cf5 100644
--- a/expr_test.go
+++ b/expr_test.go
@@ -51,7 +51,7 @@ func TestParseExpr(t *testing.T) {
},
{
in: "$(foo)",
- val: &varref{varname: literal("foo")},
+ val: &varref{varname: literal("foo"), paren: '('},
},
{
in: "$(foo:.c=.o)",
@@ -59,6 +59,7 @@ func TestParseExpr(t *testing.T) {
varname: literal("foo"),
pat: literal(".c"),
subst: literal(".o"),
+ paren: '(',
},
},
{
@@ -70,12 +71,15 @@ func TestParseExpr(t *testing.T) {
literal("(subst"),
&varref{
varname: literal("space"),
+ paren: '(',
},
&varref{
varname: literal(","),
+ paren: '(',
},
&varref{
varname: literal("foo"),
+ paren: '(',
},
},
},
@@ -91,6 +95,7 @@ func TestParseExpr(t *testing.T) {
literal("(subst"),
&varref{
varname: literal("space"),
+ paren: '(',
},
&varref{
varname: literal(""),
@@ -99,6 +104,7 @@ func TestParseExpr(t *testing.T) {
literal(","),
&varref{
varname: literal("foo"),
+ paren: '(',
},
},
},
@@ -185,9 +191,11 @@ func TestParseExpr(t *testing.T) {
literal("(and"),
&varref{
varname: literal("TRUE"),
+ paren: '{',
},
&varref{
varname: literal("X"),
+ paren: '(',
},
},
},
@@ -246,7 +254,8 @@ func TestParseExpr(t *testing.T) {
lhs: "foo",
op: ":=",
rhs: &varref{
- literal("bar"),
+ varname: literal("bar"),
+ paren: '(',
},
},
},