xref: /llvm-project/clang/test/Lexer/case-insensitive-include-ms.c (revision 8fc7a907b93a8e9eef96e872f8f926db3ebfe9b6)
1f42103ceSTaewook Oh // REQUIRES: case-insensitive-filesystem
2f42103ceSTaewook Oh 
35b57633aSKuba Mracek // RUN: mkdir -p %t/Output/apath
45b57633aSKuba Mracek // RUN: cp %S/Inputs/case-insensitive-include.h %t/Output
55b57633aSKuba Mracek // RUN: cd %t/Output
65b57633aSKuba Mracek // RUN: %clang_cc1 -fsyntax-only -fms-compatibility %s -include %s -I %t/Output -verify
75b57633aSKuba Mracek // RUN: %clang_cc1 -fsyntax-only -fms-compatibility -fdiagnostics-parseable-fixits %s -include %s -I %t/Output 2>&1 | FileCheck %s
8f42103ceSTaewook Oh 
9f42103ceSTaewook Oh #include "..\Output\.\case-insensitive-include.h"
10f42103ceSTaewook Oh #include "..\Output\.\Case-Insensitive-Include.h" // expected-warning {{non-portable path}}
11f42103ceSTaewook Oh // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:10-[[@LINE-1]]:50}:"\"..\\Output\\.\\case-insensitive-include.h\""
12*8fc7a907SNico Weber #include "..\\Output\.\\Case-Insensitive-Include.h" // expected-warning {{non-portable path}}
13*8fc7a907SNico Weber // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:10-[[@LINE-1]]:52}:"\"..\\\\Output\\.\\\\case-insensitive-include.h\""
14f42103ceSTaewook Oh #include "..\output\.\case-insensitive-include.h" // expected-warning {{non-portable path}}
15f42103ceSTaewook Oh // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:10-[[@LINE-1]]:50}:"\"..\\Output\\.\\case-insensitive-include.h\""
16f42103ceSTaewook Oh 
17f42103ceSTaewook Oh #include "apath\..\.\case-insensitive-include.h"
18f42103ceSTaewook Oh #include "apath\..\.\Case-Insensitive-Include.h" // expected-warning {{non-portable path}}
19f42103ceSTaewook Oh // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:10-[[@LINE-1]]:49}:"\"apath\\..\\.\\case-insensitive-include.h\""
20*8fc7a907SNico Weber #include "apath\\..\\.\\Case-Insensitive-Include.h" // expected-warning {{non-portable path}}
21*8fc7a907SNico Weber // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:10-[[@LINE-1]]:52}:"\"apath\\\\..\\\\.\\\\case-insensitive-include.h\""
22f42103ceSTaewook Oh #include "APath\..\.\case-insensitive-include.h" // For the sake of efficiency, this case is not diagnosed. :-(
23