23 lines · cpp
1// RUN: echo '{' > %t.json2// RUN: echo ' "married": true' >> %t.json3// RUN: echo '}' >> %t.json4 5// RUN: clang-format -n -style=LLVM %t.json 2>&1 | FileCheck %s -allow-empty6 7// RUN: clang-format -n -style=LLVM < %t.json 2>&1 \8// RUN: | FileCheck %s -check-prefix=CHECK2 -strict-whitespace9 10// RUN: echo '{' > %t.json11// RUN: echo ' "married" : true' >> %t.json12// RUN: echo '}' >> %t.json13 14// RUN: clang-format -n -style=LLVM < %t.json 2>&1 | FileCheck %s -allow-empty15 16// RUN: clang-format -n -style=LLVM %t.json 2>&1 \17// RUN: | FileCheck %s -check-prefix=CHECK2 -strict-whitespace18 19// RUN: rm %t.json20 21// CHECK-NOT: warning22// CHECK2: warning: code should be clang-formatted23