summaryrefslogtreecommitdiff
path: root/test/Format
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2013-12-02 15:21:38 +0000
committerAlexander Kornienko <alexfh@google.com>2013-12-02 15:21:38 +0000
commit34451b1a84817de73e4db3bd5e15db1a91c9009b (patch)
treeae9346efce8e35f9d41f7ef6d79be6aaddffd9db /test/Format
parentad6ee4b59967d864aa59723bce473a97b2465a19 (diff)
Added an option to specify fallback style.
Summary: Added -fallback-style option. Changed clang-format to stop searching for .clang-format when an invalid file is found. Reviewers: djasper, klimek Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D2292 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196108 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Format')
-rw-r--r--test/Format/style-on-command-line.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/Format/style-on-command-line.cpp b/test/Format/style-on-command-line.cpp
index 22131a1ebe..554a67e264 100644
--- a/test/Format/style-on-command-line.cpp
+++ b/test/Format/style-on-command-line.cpp
@@ -7,7 +7,7 @@
// RUN: printf "BasedOnStyle: google\nIndentWidth: 5\n" > %T/.clang-format
// RUN: clang-format -style=file %t.cpp 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK5 %s
// RUN: printf "\n" > %T/.clang-format
-// RUN: clang-format -style=file %t.cpp 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK6 %s
+// RUN: clang-format -style=file -fallback-style=webkit %t.cpp 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK6 %s
// RUN: [ ! -e %T/.clang-format ] || rm %T/.clang-format
// RUN: [ ! -e %T/_clang-format ] || rm %T/_clang-format
// RUN: printf "BasedOnStyle: google\nIndentWidth: 6\n" > %T/_clang-format
@@ -22,7 +22,8 @@ void f() {
// CHECK4: {{^ int \*i;$}}
// CHECK5: {{^ int\* i;$}}
// CHECK6: {{^Error reading .*\.clang-format: Invalid argument}}
-// XCHECK6X: {{^ int \*i;$}}
+// CHECK6: {{^Can't find usable .clang-format, using webkit style$}}
+// CHECK6: {{^ int\* i;$}}
// CHECK7: {{^ int\* i;$}}
int*i;
int j;