Debian Codegraph @

clang/test/Format/dry-run-warning.cpp

raw
1 // RUN: echo '{' > %t.json
2 // RUN: echo ' "married": true' >> %t.json
3 // RUN: echo '}' >> %t.json
4
5 // RUN: clang-format -n -style=LLVM %t.json 2>&1 | FileCheck %s -allow-empty
6
7 // RUN: clang-format -n -style=LLVM < %t.json 2>&1 \
8 // RUN: | FileCheck %s -check-prefix=CHECK2 -strict-whitespace
9
10 // RUN: echo '{' > %t.json
11 // RUN: echo ' "married" : true' >> %t.json
12 // RUN: echo '}' >> %t.json
13
14 // RUN: clang-format -n -style=LLVM < %t.json 2>&1 | FileCheck %s -allow-empty
15
16 // RUN: clang-format -n -style=LLVM %t.json 2>&1 \
17 // RUN: | FileCheck %s -check-prefix=CHECK2 -strict-whitespace
18
19 // RUN: rm %t.json
20
21 // CHECK-NOT: warning
22 // CHECK2: warning: code should be clang-formatted