summaryrefslogtreecommitdiff
path: root/test/Format/language-detection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Format/language-detection.cpp')
-rw-r--r--test/Format/language-detection.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Format/language-detection.cpp b/test/Format/language-detection.cpp
new file mode 100644
index 000000000000..bec444dc9dda
--- /dev/null
+++ b/test/Format/language-detection.cpp
@@ -0,0 +1,7 @@
+// RUN: grep -Ev "// *[A-Z0-9_]+:" %s > %t.js
+// RUN: grep -Ev "// *[A-Z0-9_]+:" %s > %t.cpp
+// RUN: clang-format -style=llvm %t.js | FileCheck -strict-whitespace -check-prefix=CHECK1 %s
+// RUN: clang-format -style=llvm %t.cpp | FileCheck -strict-whitespace -check-prefix=CHECK2 %s
+// CHECK1: {{^a >>>= b;$}}
+// CHECK2: {{^a >> >= b;$}}
+a >>>= b;