summaryrefslogtreecommitdiff
path: root/test cases/unit
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-12-23 16:19:45 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2018-12-24 00:46:16 +0200
commit33f8d6d4c653b1894c29388d6a51f1815209900c (patch)
tree8368d3f7669bc8392eb01e517618bf62765ea6bf /test cases/unit
parent4df9006ca43338fea07b9d542f94da34369e43d3 (diff)
downloadmeson-clangformat.tar.gz
Add a clang-format target.clangformat
Diffstat (limited to 'test cases/unit')
-rw-r--r--test cases/unit/51 clang-format/.clang-format5
-rw-r--r--test cases/unit/51 clang-format/meson.build4
-rw-r--r--test cases/unit/51 clang-format/prog_expected_c6
-rw-r--r--test cases/unit/51 clang-format/prog_orig_c21
4 files changed, 36 insertions, 0 deletions
diff --git a/test cases/unit/51 clang-format/.clang-format b/test cases/unit/51 clang-format/.clang-format
new file mode 100644
index 000000000..5c60ac9f3
--- /dev/null
+++ b/test cases/unit/51 clang-format/.clang-format
@@ -0,0 +1,5 @@
+---
+BasedOnStyle: LLVM
+IndentWidth: 4
+UseTab: Never
+---
diff --git a/test cases/unit/51 clang-format/meson.build b/test cases/unit/51 clang-format/meson.build
new file mode 100644
index 000000000..1b93cd54d
--- /dev/null
+++ b/test cases/unit/51 clang-format/meson.build
@@ -0,0 +1,4 @@
+project('clangformat', 'c')
+
+executable('prog', 'prog.c')
+
diff --git a/test cases/unit/51 clang-format/prog_expected_c b/test cases/unit/51 clang-format/prog_expected_c
new file mode 100644
index 000000000..a045966a7
--- /dev/null
+++ b/test cases/unit/51 clang-format/prog_expected_c
@@ -0,0 +1,6 @@
+#include <stdio.h>
+
+int main(int argc, char **argv) {
+ printf("Awful.\n");
+ return 0;
+}
diff --git a/test cases/unit/51 clang-format/prog_orig_c b/test cases/unit/51 clang-format/prog_orig_c
new file mode 100644
index 000000000..f098bbcce
--- /dev/null
+++ b/test cases/unit/51 clang-format/prog_orig_c
@@ -0,0 +1,21 @@
+#include <stdio.h>
+
+
+
+
+int
+main(
+int
+argc,
+char**
+argv)
+{
+printf(
+"Awful.\n"
+)
+;
+return
+0
+;
+}
+