File tree Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change 1- rm -f result.txt
1+ #! /bin/bash
2+ # 2 Failed cases are expected
3+ pre-commit clean
4+ pre-commit run -c testing/pre-commit-config.yaml --files testing/main.c | tee -a result.txt || true
25git restore testing/main.c
36
4- for config in testing/pre-commit-config.yaml testing/pre-commit-config-version.yaml testing/pre-commit-config-verbose.yaml; do
5- pre-commit clean
6- pre-commit run -c $config --files testing/main.c | tee -a result.txt || true
7- git restore testing/main.c
8- done
7+ # 10 Failed cases are expected
8+ pre-commit clean
9+ pre-commit run -c testing/pre-commit-config-version.yaml --files testing/main.c | tee -a result.txt || true
10+ git restore testing/main.c
11+ cat result.txt
12+
13+ # 2 Failed cases are expected
14+ pre-commit clean
15+ pre-commit run -c testing/pre-commit-config-verbose.yaml --files testing/main.c | tee -a result.txt || true
16+ git restore testing/main.c
17+ cat result.txt
918
1019failed_cases=` grep -c " Failed" result.txt`
1120
1221echo $failed_cases " cases failed."
1322
14- if [ $failed_cases -eq 9 ]; then
23+ if [ $failed_cases -eq 10 ]; then
1524 echo " =============================="
1625 echo " Test cpp-linter-hooks success."
1726 echo " =============================="
You can’t perform that action at this time.
0 commit comments