aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2012-03-25 03:42:26 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2012-03-25 03:42:26 +0000
commitb293f524f68330bfc78ae4df14da75938e98e000 (patch)
tree031b31fb087209c90ee83861349a91aa97a136c8
parent7e42392eb2ea29ddeb6d125417fb4c17d847b5e0 (diff)
test/Driver/cpath.c: Escape a few args that contain %{pathsep}.
On msys bash, with %pathsep==os.pathsep==';', I can see lines like below in this script; env DIR=X:/foo%{pathsep}X:/bar Then it is expanded to; env DIR=X:/foo;X:/bar It should be with quote; env "DIR=X:/foo;X:/bar" git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153402 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Driver/cpath.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/Driver/cpath.c b/test/Driver/cpath.c
index 5165542f02..bd7c8d0ab5 100644
--- a/test/Driver/cpath.c
+++ b/test/Driver/cpath.c
@@ -1,13 +1,13 @@
// RUN: mkdir -p %T/test1 %T/test2 %T/test3
-// RUN: env CPATH=%T/test1%{pathsep}%T/test2 %clang -x c -E -v %s 2>&1 | FileCheck %s -check-prefix=CPATH
+// RUN: env "CPATH=%T/test1%{pathsep}%T/test2" %clang -x c -E -v %s 2>&1 | FileCheck %s -check-prefix=CPATH
// CPATH: -I {{.*}}/test1
// CPATH: -I {{.*}}/test2
// CPATH: search starts here
// CPATH: test1
// CPATH: test2
-// RUN: env OBJC_INCLUDE_PATH=%T/test1%{pathsep}%T/test2 OBJCPLUS_INCLUDE_PATH=%T/test1 CPLUS_INCLUDE_PATH=%T/test1%{pathsep}%t/test2 C_INCLUDE_PATH=%T/test3 %clang -x c -E -v %s 2>&1 | FileCheck %s -check-prefix=C_INCLUDE_PATH
+// RUN: env "OBJC_INCLUDE_PATH=%T/test1%{pathsep}%T/test2" OBJCPLUS_INCLUDE_PATH=%T/test1 "CPLUS_INCLUDE_PATH=%T/test1%{pathsep}%t/test2" C_INCLUDE_PATH=%T/test3 %clang -x c -E -v %s 2>&1 | FileCheck %s -check-prefix=C_INCLUDE_PATH
// C_INCLUDE_PATH: -c-isystem {{"?.*}}/test3{{"?}} -cxx-isystem {{"?.*}}/test1{{"?}} -cxx-isystem {{"?.*}}/test2{{"?}} -objc-isystem {{"?.*}}/test1{{"?}} -objc-isystem {{"?.*}}/test2{{"?}} -objcxx-isystem {{"?.*}}/test1{{"?}}
// C_INCLUDE_PATH: search starts here
// C_INCLUDE_PATH-NOT: test1