[cfe-commits] r153402 - /cfe/trunk/test/Driver/cpath.c

NAKAMURA Takumi geek4civic at gmail.com
Sat Mar 24 20:42:26 PDT 2012

Author: chapuni
Date: Sat Mar 24 22:42:26 2012
New Revision: 153402

URL: http://llvm.org/viewvc/llvm-project?rev=153402&view=rev
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"


Modified: cfe/trunk/test/Driver/cpath.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cpath.c?rev=153402&r1=153401&r2=153402&view=diff
--- cfe/trunk/test/Driver/cpath.c (original)
+++ cfe/trunk/test/Driver/cpath.c Sat Mar 24 22:42:26 2012
@@ -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

More information about the cfe-commits mailing list