]> granicus.if.org Git - clang/commitdiff
clang-format: remove tests that assume no config file will be found as this is not...
authorAntonio Maiorano <amaiorano@gmail.com>
Mon, 23 Jan 2017 13:20:23 +0000 (13:20 +0000)
committerAntonio Maiorano <amaiorano@gmail.com>
Mon, 23 Jan 2017 13:20:23 +0000 (13:20 +0000)
These tests fail for developers who place their build directories under the
llvm root directory because llvm's own .clang-format file will be found.
Anyway these cases are covered by FormatStyle.GetStyleOfFile tests
(FormatTest.cpp).

Differential Revision: https://reviews.llvm.org/D28983

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

test/Format/style-on-command-line.cpp

index d6ab41f5751aee35e1afd80e294007d02f14aba4..b2724353da134b2b954fcccfcf32c0428075a232 100644 (file)
 // RUN: clang-format -style="{BasedOnStyle: WebKit, PointerBindsToType: false}" %s | FileCheck -strict-whitespace -check-prefix=CHECK9 %s
 
 // Fallback style tests
-// RUN: rm %T/_clang-format
-// Test no config file found, WebKit fallback style is applied
-// RUN: clang-format -style=file -fallback-style=WebKit -assume-filename=%T/foo.cpp < %s 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK10 %s
-// Test no config file and fallback style "none", no formatting is applied
-// RUN: clang-format -style=file -fallback-style=none -assume-filename=%T/foo.cpp < %s 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK11 %s
 // Test config file with no based style, and fallback style "none", formatting is applied
 // RUN: printf "IndentWidth: 6\n" > %T/_clang-format
-// RUN: clang-format -style=file -fallback-style=none -assume-filename=%T/foo.cpp < %s 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK12 %s
+// RUN: clang-format -style=file -fallback-style=none -assume-filename=%T/foo.cpp < %s 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK10 %s
 // Test yaml with no based style, and fallback style "none", LLVM formatting applied
-// RUN: clang-format -style="{IndentWidth: 7}" -fallback-style=none %s | FileCheck -strict-whitespace -check-prefix=CHECK13 %s
+// RUN: clang-format -style="{IndentWidth: 7}" -fallback-style=none %s | FileCheck -strict-whitespace -check-prefix=CHECK11 %s
 
 void f() {
 // CHECK1: {{^        int\* i;$}}
@@ -35,10 +30,8 @@ void f() {
 // CHECK7: {{^      int\* i;$}}
 // CHECK8: {{^  int\* i;$}}
 // CHECK9: {{^    int \*i;$}}
-// CHECK10: {{^    int\* i;$}}
-// CHECK11: {{^int\*i;$}}
-// CHECK12: {{^      int \*i;$}}
-// CHECK13: {{^       int \*i;$}}
+// CHECK10: {{^      int \*i;$}}
+// CHECK11: {{^       int \*i;$}}
 int*i;
 int j;
 }