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