mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-23 13:50:11 +00:00
615f838f73
Also fixed the error message for start line > end line and added test cases. Fixes #56438. Differential Revision: https://reviews.llvm.org/D129348
20 lines
596 B
C++
20 lines
596 B
C++
// RUN: grep -Ev "// *[A-Z-]+:" %s \
|
|
// RUN: | clang-format -style=LLVM -lines=1:1 -lines=5:5 \
|
|
// RUN: | FileCheck -strict-whitespace %s
|
|
// CHECK: {{^int\ \*i;$}}
|
|
int*i;
|
|
|
|
// CHECK: {{^int\ \ \*\ \ i;$}}
|
|
int * i;
|
|
|
|
// CHECK: {{^int\ \*i;$}}
|
|
int * i;
|
|
|
|
// 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
|