2015-10-20 00:21:29 +08:00
|
|
|
// RUN: grep -Ev "// *[A-Z-]+:" %s \
|
|
|
|
// RUN: | clang-format -style=LLVM -lines=1:1 -lines=5:5 \
|
|
|
|
// RUN: | FileCheck -strict-whitespace %s
|
2013-07-19 06:54:56 +08:00
|
|
|
// CHECK: {{^int\ \*i;$}}
|
|
|
|
int*i;
|
|
|
|
|
2015-10-28 09:08:22 +08:00
|
|
|
// CHECK: {{^int\ \ \*\ \ i;$}}
|
|
|
|
int * i;
|
2013-07-19 06:54:56 +08:00
|
|
|
|
2015-10-28 09:08:22 +08:00
|
|
|
// CHECK: {{^int\ \*i;$}}
|
|
|
|
int * i;
|
2022-07-08 14:34:44 +08:00
|
|
|
|
|
|
|
// RUN: not clang-format -lines=0:1 < %s 2>&1 \
|
|
|
|
// RUN: | FileCheck -strict-whitespace -check-prefix=CHECK0 %s
|
|
|
|
// CHECK0: error: start line should be at least 1
|
|
|
|
|
|
|
|
// RUN: not clang-format -lines=2:1 < %s 2>&1 \
|
|
|
|
// RUN: | FileCheck -strict-whitespace -check-prefix=CHECK1 %s
|
|
|
|
// CHECK1: error: start line should not exceed end line
|