@@ -39,69 +39,77 @@ function test_function_matches_tags_include_match() {
3939 local include_tags=" slow"
4040 local exclude_tags=" "
4141
42- bashunit::helper::function_matches_tags " $tags " " $include_tags " " $exclude_tags "
43- assert_successful_code " $? "
42+ local exit_code=0
43+ bashunit::helper::function_matches_tags " $tags " " $include_tags " " $exclude_tags " || exit_code=$?
44+ assert_same 0 " $exit_code "
4445}
4546
4647function test_function_matches_tags_include_no_match() {
4748 local tags=" fast"
4849 local include_tags=" slow"
4950 local exclude_tags=" "
5051
51- bashunit::helper::function_matches_tags " $tags " " $include_tags " " $exclude_tags "
52- assert_general_error " $? "
52+ local exit_code=0
53+ bashunit::helper::function_matches_tags " $tags " " $include_tags " " $exclude_tags " || exit_code=$?
54+ assert_same 1 " $exit_code "
5355}
5456
5557function test_function_matches_tags_exclude_match() {
5658 local tags=" slow,database"
5759 local include_tags=" "
5860 local exclude_tags=" slow"
5961
60- bashunit::helper::function_matches_tags " $tags " " $include_tags " " $exclude_tags "
61- assert_general_error " $? "
62+ local exit_code=0
63+ bashunit::helper::function_matches_tags " $tags " " $include_tags " " $exclude_tags " || exit_code=$?
64+ assert_same 1 " $exit_code "
6265}
6366
6467function test_function_matches_tags_exclude_wins_over_include() {
6568 local tags=" slow,database"
6669 local include_tags=" database"
6770 local exclude_tags=" slow"
6871
69- bashunit::helper::function_matches_tags " $tags " " $include_tags " " $exclude_tags "
70- assert_general_error " $? "
72+ local exit_code=0
73+ bashunit::helper::function_matches_tags " $tags " " $include_tags " " $exclude_tags " || exit_code=$?
74+ assert_same 1 " $exit_code "
7175}
7276
7377function test_function_matches_tags_no_tags_with_include_filter() {
7478 local tags=" "
7579 local include_tags=" slow"
7680 local exclude_tags=" "
7781
78- bashunit::helper::function_matches_tags " $tags " " $include_tags " " $exclude_tags "
79- assert_general_error " $? "
82+ local exit_code=0
83+ bashunit::helper::function_matches_tags " $tags " " $include_tags " " $exclude_tags " || exit_code=$?
84+ assert_same 1 " $exit_code "
8085}
8186
8287function test_function_matches_tags_no_tags_with_exclude_filter() {
8388 local tags=" "
8489 local include_tags=" "
8590 local exclude_tags=" slow"
8691
87- bashunit::helper::function_matches_tags " $tags " " $include_tags " " $exclude_tags "
88- assert_successful_code " $? "
92+ local exit_code=0
93+ bashunit::helper::function_matches_tags " $tags " " $include_tags " " $exclude_tags " || exit_code=$?
94+ assert_same 0 " $exit_code "
8995}
9096
9197function test_function_matches_tags_multiple_include_or_logic() {
9298 local tags=" fast"
9399 local include_tags=" slow,fast"
94100 local exclude_tags=" "
95101
96- bashunit::helper::function_matches_tags " $tags " " $include_tags " " $exclude_tags "
97- assert_successful_code " $? "
102+ local exit_code=0
103+ bashunit::helper::function_matches_tags " $tags " " $include_tags " " $exclude_tags " || exit_code=$?
104+ assert_same 0 " $exit_code "
98105}
99106
100107function test_function_matches_tags_multiple_exclude_or_logic() {
101108 local tags=" fast"
102109 local include_tags=" "
103110 local exclude_tags=" slow,fast"
104111
105- bashunit::helper::function_matches_tags " $tags " " $include_tags " " $exclude_tags "
106- assert_general_error " $? "
112+ local exit_code=0
113+ bashunit::helper::function_matches_tags " $tags " " $include_tags " " $exclude_tags " || exit_code=$?
114+ assert_same 1 " $exit_code "
107115}
0 commit comments