Hi djasper,
Test clang-format's handling of empty .clang-format files.
http://llvm-reviews.chandlerc.com/D1562
Files:
test/Format/style-on-command-line.cpp
Index: test/Format/style-on-command-line.cpp
===================================================================
--- test/Format/style-on-command-line.cpp
+++ test/Format/style-on-command-line.cpp
@@ -5,8 +5,10 @@
// RUN: clang-format -style="{lsjd}" %t.cpp 2>&1 | FileCheck
-strict-whitespace -check-prefix=CHECK4 %s
// RUN: [ ! -e %T/.clang-format ] || rm %T/.clang-format
// RUN: clang-format -style=file %t.cpp 2>&1 | FileCheck -strict-whitespace
-check-prefix=CHECK5 %s
-// RUN: printf "BasedOnStyle: google\nIndentWidth: 5\n" > %T/.clang-format
+// RUN: printf "\n" > %T/.clang-format
// RUN: clang-format -style=file %t.cpp 2>&1 | FileCheck -strict-whitespace
-check-prefix=CHECK6 %s
+// RUN: printf "BasedOnStyle: google\nIndentWidth: 5\n" > %T/.clang-format
+// RUN: clang-format -style=file %t.cpp 2>&1 | FileCheck -strict-whitespace
-check-prefix=CHECK7 %s
void f() {
// CHECK1: {{^ int\* i;$}}
// CHECK2: {{^ int \*i;$}}
@@ -17,7 +19,9 @@
// CHECK4: {{^ int \*i;$}}
// CHECK5: Can't find usable .clang-format, using LLVM style
// CHECK5: {{^ int \*i;$}}
-// CHECK6: {{^ int\* i;$}}
+// CHECK6: Can't find usable .clang-format, using LLVM style
+// CHECK6: {{^ int \*i;$}}
+// CHECK7: {{^ int\* i;$}}
int*i;
int j;
}
Index: test/Format/style-on-command-line.cpp
===================================================================
--- test/Format/style-on-command-line.cpp
+++ test/Format/style-on-command-line.cpp
@@ -5,8 +5,10 @@
// RUN: clang-format -style="{lsjd}" %t.cpp 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK4 %s
// RUN: [ ! -e %T/.clang-format ] || rm %T/.clang-format
// RUN: clang-format -style=file %t.cpp 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK5 %s
-// RUN: printf "BasedOnStyle: google\nIndentWidth: 5\n" > %T/.clang-format
+// RUN: printf "\n" > %T/.clang-format
// RUN: clang-format -style=file %t.cpp 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK6 %s
+// RUN: printf "BasedOnStyle: google\nIndentWidth: 5\n" > %T/.clang-format
+// RUN: clang-format -style=file %t.cpp 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK7 %s
void f() {
// CHECK1: {{^ int\* i;$}}
// CHECK2: {{^ int \*i;$}}
@@ -17,7 +19,9 @@
// CHECK4: {{^ int \*i;$}}
// CHECK5: Can't find usable .clang-format, using LLVM style
// CHECK5: {{^ int \*i;$}}
-// CHECK6: {{^ int\* i;$}}
+// CHECK6: Can't find usable .clang-format, using LLVM style
+// CHECK6: {{^ int \*i;$}}
+// CHECK7: {{^ int\* i;$}}
int*i;
int j;
}
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits