Skip to content

Commit 51f4010

Browse files
committed
fix(tests): fix syntax, log results
1 parent 4db8c11 commit 51f4010

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

tests.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ echo "$fail" | grep -Eq "Your commit message does not follow Conventional Commit
3939

4040
(( result += "$?" ))
4141

42+
echo "$result"
43+
4244
echo "test a success"
4345

4446
setup
@@ -51,32 +53,38 @@ echo "$pass" | grep -Eq "\[main \(root-commit\) [[:alnum:]]{7}\] test: conventio
5153

5254
(( result += "$?" ))
5355

56+
echo "$result"
57+
5458
echo "test printable characters/marks in subject"
5559

5660
echo "test escaped double quote \""
5761

5862
setup
5963

60-
pass="$(git commit -m 'test: conventional-pre-commit \"')"
64+
pass="$(git commit -m 'test: conventional-pre-commit "')"
6165

6266
teardown
6367

6468
echo "$pass" | grep -Eq "\[main \(root-commit\) [[:alnum:]]{7}\] test: conventional-pre-commit \""
6569

6670
(( result += "$?" ))
6771

72+
echo "$result"
73+
6874
echo "test backtick \`"
6975

7076
setup
7177

72-
pass="$(git commit -m 'test: conventional-pre-commit \`')"
78+
pass="$(git commit -m 'test: conventional-pre-commit `')"
7379

7480
teardown
7581

7682
echo "$pass" | grep -Eq "\[main \(root-commit\) [[:alnum:]]{7}\] test: conventional-pre-commit \`"
7783

7884
(( result += "$?" ))
7985

86+
echo "$result"
87+
8088
echo "test hash/number sign #"
8189

8290
setup
@@ -89,6 +97,8 @@ echo "$pass" | grep -Eq "\[main \(root-commit\) [[:alnum:]]{7}\] test: conventio
8997

9098
(( result += "$?" ))
9199

100+
echo "$result"
101+
92102
echo "test ampersand &"
93103

94104
setup
@@ -101,4 +111,6 @@ echo "$pass" | grep -Eq "\[main \(root-commit\) [[:alnum:]]{7}\] test: conventio
101111

102112
(( result += "$?" ))
103113

114+
echo "$result"
115+
104116
exit "$result"

0 commit comments

Comments
 (0)