From bfaec9bf8b8ce377324026486cd3e8f21bc4c1da Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Wed, 12 Mar 2014 02:53:12 +0000 Subject: [PATCH] Lexer: split test into separate files Unfortunately, XFAIL applies to the entire file. Split the test into two different units, enabling the proper application of XFAIL on the test which is expected to fail on Windows. llvm-svn: 203633 --- .../Lexer/cross-windows-on-linux-default.cpp | 6 ++++++ clang/test/Lexer/cross-windows-on-linux.cpp | 18 ++++++++---------- 2 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 clang/test/Lexer/cross-windows-on-linux-default.cpp diff --git a/clang/test/Lexer/cross-windows-on-linux-default.cpp b/clang/test/Lexer/cross-windows-on-linux-default.cpp new file mode 100644 index 000000000000..520b419a7100 --- /dev/null +++ b/clang/test/Lexer/cross-windows-on-linux-default.cpp @@ -0,0 +1,6 @@ +// RUN: not %clang_cc1 -fsyntax-only -fms-compatibility -triple i686-win32 %s 2>&1 \ +// RUN: | FileCheck %s + +#include "Inputs\success.h" + +// CHECK: error: success diff --git a/clang/test/Lexer/cross-windows-on-linux.cpp b/clang/test/Lexer/cross-windows-on-linux.cpp index 142640c165fb..0bbbd6601d39 100644 --- a/clang/test/Lexer/cross-windows-on-linux.cpp +++ b/clang/test/Lexer/cross-windows-on-linux.cpp @@ -1,14 +1,12 @@ -// RUN: not %clang_cc1 -fsyntax-only -triple i686-win32 %s 2>&1 \ -// RUN: | FileCheck %s -check-prefix CHECK-NO-COMPAT -// XFAIL: win32 - -// RUN: not %clang_cc1 -fsyntax-only -fms-compatibility -triple i686-win32 %s 2>&1 \ -// RUN: | FileCheck %s -check-prefix CHECK-COMPAT +// RUN: not %clang_cc1 -fsyntax-only -triple i686-win32 %s 2>&1 | FileCheck %s #include "Inputs\success.h" -// CHECK-NO-COMPAT: error: 'Inputs\success.h' file not found -// CHECK-NO-COMPAT: #include "Inputs\success.h" -// CHECK-NO-COMPAT: ^ +// CHECK: error: 'Inputs\success.h' file not found +// CHECK: #include "Inputs\success.h" +// CHECK: ^ + +// expected to fail on windows as the inclusion would success and the +// compilation will fail due to the '#error success' +// XFAIL: win32 -// CHECK-COMPAT: error: success