From: Alexander Kornienko Date: Mon, 2 Sep 2013 13:44:16 +0000 (+0000) Subject: Test for empty .clang-format file. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3361f10d6b21327b082c53facef0741c13b2ffa7;p=clang 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 --- 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; }