]> granicus.if.org Git - clang/commitdiff
testcase for -ftabstop, patch by Christian Adaker!
authorChris Lattner <sabre@nondot.org>
Tue, 12 Jan 2010 22:06:58 +0000 (22:06 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 12 Jan 2010 22:06:58 +0000 (22:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93260 91177308-0d34-0410-b5e6-96231b3b80d8

test/Misc/tabstop.c [new file with mode: 0644]

diff --git a/test/Misc/tabstop.c b/test/Misc/tabstop.c
new file mode 100644 (file)
index 0000000..3fabda7
--- /dev/null
@@ -0,0 +1,30 @@
+// RUN: %clang_cc1 -ftabstop 3 -fsyntax-only %s 2>&1 | FileCheck -check-prefix=3 -strict-whitespace %s
+// RUN: %clang_cc1 -ftabstop 4 -fsyntax-only %s 2>&1 | FileCheck -check-prefix=4 -strict-whitespace %s
+// RUN: %clang_cc1 -ftabstop 5 -fsyntax-only %s 2>&1 | FileCheck -check-prefix=5 -strict-whitespace %s
+
+// tab
+       void* a = 1;
+
+// tab tab
+               void* b = 1;
+
+// 3x space tab
+       void* c = 1;
+
+// tab at column 10
+void* d =      1;
+
+//CHECK-3: {{^   void\* a = 1;}}
+//CHECK-3: {{^      void\* b = 1;}}
+//CHECK-3: {{^      void\* c = 1;}}
+//CHECK-3: {{^void\* d =   1;}}
+
+//CHECK-4: {{^    void\* a = 1;}}
+//CHECK-4: {{^        void\* b = 1;}}
+//CHECK-4: {{^    void\* c = 1;}}
+//CHECK-4: {{^void\* d =   1;}}
+
+//CHECK-5: {{^     void\* a = 1;}}
+//CHECK-5: {{^          void\* b = 1;}}
+//CHECK-5: {{^     void\* c = 1;}}
+//CHECK-5: {{^void\* d = 1;}}