1 // REQUIRES: case-insensitive-filesystem
2 
3 // RUN: mkdir -p %t/Output/apath
4 // RUN: cp %S/Inputs/case-insensitive-include.h %t/Output
5 // RUN: cd %t/Output
6 // RUN: %clang_cc1 -fsyntax-only -fms-compatibility %s -include %s -I %t/Output -verify
7 // RUN: %clang_cc1 -fsyntax-only -fms-compatibility -fdiagnostics-parseable-fixits %s -include %s -I %t/Output 2>&1 | FileCheck %s
8 
9 #include "..\Output\.\case-insensitive-include.h"
10 #include "..\Output\.\Case-Insensitive-Include.h" // expected-warning {{non-portable path}}
11 // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:10-[[@LINE-1]]:50}:"\"..\\Output\\.\\case-insensitive-include.h\""
12 #include "..\\Output\.\\Case-Insensitive-Include.h" // expected-warning {{non-portable path}}
13 // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:10-[[@LINE-1]]:52}:"\"..\\\\Output\\.\\\\case-insensitive-include.h\""
14 #include "..\output\.\case-insensitive-include.h" // expected-warning {{non-portable path}}
15 // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:10-[[@LINE-1]]:50}:"\"..\\Output\\.\\case-insensitive-include.h\""
16 
17 #include "apath\..\.\case-insensitive-include.h"
18 #include "apath\..\.\Case-Insensitive-Include.h" // expected-warning {{non-portable path}}
19 // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:10-[[@LINE-1]]:49}:"\"apath\\..\\.\\case-insensitive-include.h\""
20 #include "apath\\..\\.\\Case-Insensitive-Include.h" // expected-warning {{non-portable path}}
21 // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:10-[[@LINE-1]]:52}:"\"apath\\\\..\\\\.\\\\case-insensitive-include.h\""
22 #include "APath\..\.\case-insensitive-include.h" // For the sake of efficiency, this case is not diagnosed. :-(
23