Skip to content

Commit 7368f3b

Browse files
committed
update testing run.sh
1 parent ee23d5c commit 7368f3b

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

testing/run.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,32 @@
11
#!/bin/bash
22
# 2 Failed cases are expected
3+
echo "==========================="
4+
echo "Test pre-commit-config.yaml"
5+
echo "==========================="
36
pre-commit clean
47
pre-commit run -c testing/pre-commit-config.yaml --files testing/main.c | tee -a result.txt || true
58
git restore testing/main.c
69

710
# 10 Failed cases are expected
11+
echo "===================================="
12+
echo "Test pre-commit-config-version.yaml"
13+
echo "===================================="
814
pre-commit clean
915
pre-commit run -c testing/pre-commit-config-version.yaml --files testing/main.c | tee -a result.txt || true
1016
git restore testing/main.c
11-
cat result.txt
1217

1318
# 2 Failed cases are expected
19+
echo "===================================="
20+
echo "Test pre-commit-config-verbose.yaml"
21+
echo "===================================="
1422
pre-commit clean
1523
pre-commit run -c testing/pre-commit-config-verbose.yaml --files testing/main.c | tee -a result.txt || true
1624
git restore testing/main.c
25+
26+
echo "===================================="
27+
echo "print result.txt"
1728
cat result.txt
29+
echo "===================================="
1830

1931
failed_cases=`grep -c "Failed" result.txt`
2032

@@ -24,8 +36,8 @@ if [ $failed_cases -eq 10 ]; then
2436
echo "=============================="
2537
echo "Test cpp-linter-hooks success."
2638
echo "=============================="
27-
exit 0
2839
rm result.txt
40+
exit 0
2941
else
3042
echo "============================="
3143
echo "Test cpp-linter-hooks failed."

0 commit comments

Comments
 (0)