]> granicus.if.org Git - clang/commitdiff
Fix test/Driver/cl.c.
authorHans Wennborg <hans@hanshq.net>
Sat, 27 Jul 2013 06:19:03 +0000 (06:19 +0000)
committerHans Wennborg <hans@hanshq.net>
Sat, 27 Jul 2013 06:19:03 +0000 (06:19 +0000)
This test would fail in weird ways on systems with a one-letter filename
in the root directory, because the shell would helpfully expand /? to e.g. /n.

Make sure this doesn't happen by adding quotes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187295 91177308-0d34-0410-b5e6-96231b3b80d8

test/Driver/cl.c

index c141c2f8c0f34b3e56a6b37888c8743315eb9d20..13cd9c26195ca8c2c6003d75bfceaa98d81ebae8 100644 (file)
@@ -1,14 +1,18 @@
+// Note: we have to quote the /? option, otherwise some shells will try
+// to expand the ? into a one-letter filename in the root directory,
+// and make the test fail if such a file or directory exists.
+
 // Check that clang-cl options are not available by default.
 // RUN: %clang -help | FileCheck %s -check-prefix=DEFAULT
 // DEFAULT-NOT: CL.EXE COMPATIBILITY OPTIONS
 // DEFAULT-NOT: {{/[?]}}
 // DEFAULT-NOT: /help
-// RUN: not %clang /?
+// RUN: not %clang "/?"
 // RUN: not %clang -?
 // RUN: not %clang /help
 
-// Check that /? and /help are available as clang-cl options.
-// RUN: %clang_cl /? | FileCheck %s -check-prefix=CL
+// Check that "/?" and /help are available as clang-cl options.
+// RUN: %clang_cl "/?" | FileCheck %s -check-prefix=CL
 // RUN: %clang_cl /help | FileCheck %s -check-prefix=CL
 // RUN: %clang_cl -help | FileCheck %s -check-prefix=CL
 // CL: CL.EXE COMPATIBILITY OPTIONS