summaryrefslogtreecommitdiff
path: root/test/Format
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2013-09-02 13:44:16 +0000
committerAlexander Kornienko <alexfh@google.com>2013-09-02 13:44:16 +0000
commit3361f10d6b21327b082c53facef0741c13b2ffa7 (patch)
tree9aab46924b0f10945c0564821bbbf157fe23c275 /test/Format
parent174f60f005167984d00682d1d38a2927b9c04684 (diff)
Test for empty .clang-format file.
Summary: Test clang-format's handling of empty .clang-format files. Reviewers: djasper Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D1562 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189757 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Format')
-rw-r--r--test/Format/style-on-command-line.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Format/style-on-command-line.cpp b/test/Format/style-on-command-line.cpp
index 6f81b9bf72..044264b916 100644
--- a/test/Format/style-on-command-line.cpp
+++ b/test/Format/style-on-command-line.cpp
@@ -6,6 +6,8 @@
// RUN: [ ! -e %T/.clang-format ] || rm %T/.clang-format
// 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
void f() {
// CHECK1: {{^ int\* i;$}}
// CHECK2: {{^ int \*i;$}}
@@ -15,6 +17,8 @@ void f() {
// CHECK4: Error parsing -style: Invalid argument, using LLVM style
// CHECK4: {{^ int \*i;$}}
// CHECK5: {{^ int\* i;$}}
+// CHECK6: Can't find usable .clang-format, using LLVM style
+// CHECK6: {{^ int \*i;$}}
int*i;
int j;
}