summaryrefslogtreecommitdiffstats
path: root/src/ninja_test.cc
diff options
context:
space:
mode:
authorOrestis Agathokleous <orestis.cy@gmail.com>2011-03-07 20:25:55 (GMT)
committerEvan Martin <martine@danga.com>2011-03-07 20:25:55 (GMT)
commit9d750fcd497d1762d24fbebdf903033ba4a12f90 (patch)
tree1b6785f23f708bf3373672875291126805bebc27 /src/ninja_test.cc
parent07ffa9195dd83176ddb96bbfb1eca0a3ca938a8b (diff)
downloadNinja-9d750fcd497d1762d24fbebdf903033ba4a12f90.zip
Ninja-9d750fcd497d1762d24fbebdf903033ba4a12f90.tar.gz
Ninja-9d750fcd497d1762d24fbebdf903033ba4a12f90.tar.bz2
handle variable expansion with upper-case characters
Diffstat (limited to 'src/ninja_test.cc')
-rw-r--r--src/ninja_test.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ninja_test.cc b/src/ninja_test.cc
index a90c334..bd4546b 100644
--- a/src/ninja_test.cc
+++ b/src/ninja_test.cc
@@ -64,6 +64,17 @@ TEST(EvalString, OneVariable) {
env.vars["var"] = "there";
EXPECT_EQ("hi there", str.Evaluate(&env));
}
+TEST(EvalString, OneVariableUpperCase) {
+ EvalString str;
+ string err;
+ EXPECT_TRUE(str.Parse("hi $VaR", &err));
+ EXPECT_EQ("", err);
+ EXPECT_EQ("hi $VaR", str.unparsed());
+ TestEnv env;
+ EXPECT_EQ("hi ", str.Evaluate(&env));
+ env.vars["VaR"] = "there";
+ EXPECT_EQ("hi there", str.Evaluate(&env));
+}
TEST(EvalString, Error) {
EvalString str;
string err;