2 // RUN: mkdir -p %t.dir/level1/level2
5 // RUN: echo "*" > .clang-format-ignore
6 // RUN: echo "level*/*.c*" >> .clang-format-ignore
7 // RUN: echo "*/*2/foo.*" >> .clang-format-ignore
10 // RUN: clang-format -list-ignored .clang-format-ignore foo.cc \
11 // RUN: | FileCheck %s
12 // CHECK: .clang-format-ignore
16 // RUN: touch bar.cc baz.c
17 // RUN: clang-format -list-ignored bar.cc baz.c \
18 // RUN: | FileCheck %s -check-prefix=CHECK2
23 // RUN: touch foo.c foo.js
24 // RUN: clang-format -list-ignored foo.c foo.js \
25 // RUN: | FileCheck %s -check-prefix=CHECK3
27 // CHECK3-NEXT: foo.js
29 // RUN: touch .clang-format-ignore
30 // RUN: clang-format -list-ignored foo.c foo.js \
31 // RUN: | FileCheck %s -allow-empty -check-prefix=CHECK4
35 // RUN: echo "*.js" > .clang-format-ignore
36 // RUN: clang-format -list-ignored foo.c foo.js \
37 // RUN: | FileCheck %s -check-prefix=CHECK5
42 // RUN: clang-format -list-ignored *.cc level1/*.c* level1/level2/foo.* \
43 // RUN: | FileCheck %s -check-prefix=CHECK6
45 // CHECK6-NEXT: bar.cc
48 // CHECK6-NEXT: foo.js
50 // RUN: rm .clang-format-ignore
51 // RUN: clang-format -list-ignored *.cc level1/*.c* level1/level2/foo.* \
52 // RUN: | FileCheck %s -check-prefix=CHECK7