1*f4a2713aSLionel Sambuc // Don't attempt slash switches on msys bash. 2*f4a2713aSLionel Sambuc // REQUIRES: shell-preserves-root 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc // Note: we have to quote the /? option, otherwise some shells will try to 5*f4a2713aSLionel Sambuc // expand the ? into a one-letter filename in the root directory, and make 6*f4a2713aSLionel Sambuc // the test fail is such a file or directory exists. 7*f4a2713aSLionel Sambuc 8*f4a2713aSLionel Sambuc // Note: %s must be preceded by --, otherwise it may be interpreted as a 9*f4a2713aSLionel Sambuc // command-line option, e.g. on Mac where %s is commonly under /Users. 10*f4a2713aSLionel Sambuc 11*f4a2713aSLionel Sambuc // Check that clang-cl options are not available by default. 12*f4a2713aSLionel Sambuc // RUN: %clang -help | FileCheck %s -check-prefix=DEFAULT 13*f4a2713aSLionel Sambuc // DEFAULT-NOT: CL.EXE COMPATIBILITY OPTIONS 14*f4a2713aSLionel Sambuc // DEFAULT-NOT: {{/[?]}} 15*f4a2713aSLionel Sambuc // DEFAULT-NOT: /help 16*f4a2713aSLionel Sambuc // RUN: not %clang "/?" 17*f4a2713aSLionel Sambuc // RUN: not %clang -? 18*f4a2713aSLionel Sambuc // RUN: not %clang /help 19*f4a2713aSLionel Sambuc 20*f4a2713aSLionel Sambuc // Check that /? and /help are available as clang-cl options. 21*f4a2713aSLionel Sambuc // RUN: %clang_cl "/?" | FileCheck %s -check-prefix=CL 22*f4a2713aSLionel Sambuc // RUN: %clang_cl /help | FileCheck %s -check-prefix=CL 23*f4a2713aSLionel Sambuc // RUN: %clang_cl -help | FileCheck %s -check-prefix=CL 24*f4a2713aSLionel Sambuc // CL: CL.EXE COMPATIBILITY OPTIONS 25*f4a2713aSLionel Sambuc // CL: {{/[?]}} 26*f4a2713aSLionel Sambuc // CL: /help 27*f4a2713aSLionel Sambuc 28*f4a2713aSLionel Sambuc // Options which are not "core" clang options nor cl.exe compatible options 29*f4a2713aSLionel Sambuc // are not available in clang-cl. 30*f4a2713aSLionel Sambuc // DEFAULT: -fapple-kext 31*f4a2713aSLionel Sambuc // CL-NOT: -fapple-kext 32*f4a2713aSLionel Sambuc 33*f4a2713aSLionel Sambuc // RUN: %clang_cl /c -### -- %s 2>&1 | FileCheck -check-prefix=COMPILE %s 34*f4a2713aSLionel Sambuc // COMPILE: "-fdiagnostics-format" "msvc" 35