Skip to content

Commit c7ffe3b

Browse files
committed
test: use locale-independent assertions in error acceptance tests
1 parent 627e6b4 commit c7ffe3b

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

tests/acceptance/bashunit_execution_error_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ function test_bashunit_when_a_execution_error() {
2525
printf "%sRunning ./tests/acceptance/fixtures/test_bashunit_when_a_execution_error.sh%s\n" \
2626
"${color_bold}" "${color_default}"
2727
printf "%s✗ Error%s: Error\n" "${color_red}" "${color_default}"
28-
printf " %sline 4: invalid_function_name: command not found%s\n" "${color_dim}" "${color_default}"
2928
)
3029
local fixture_end=$(
3130
format_summary_title "Tests: "
@@ -39,6 +38,7 @@ function test_bashunit_when_a_execution_error() {
3938

4039
local actual="$(./bashunit --no-parallel --detailed --env "$TEST_ENV_FILE" "$test_file")"
4140
assert_contains "$fixture_start" "$actual"
41+
assert_contains "invalid_function_name" "$actual"
4242
assert_contains "$fixture_end" "$actual"
4343
assert_general_error "$(./bashunit --no-parallel --env "$TEST_ENV_FILE" "$test_file")"
4444
}

tests/acceptance/bashunit_setup_before_script_error_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function test_bashunit_when_set_up_before_script_errors() {
1515

1616
local header_line="Running $fixture"
1717
local error_line="✗ Error: Set up before script"
18-
local message_line=" $fixture: line 4: invalid_function_name: command not found"
18+
local message_line="invalid_function_name"
1919
local tests_summary="Tests: 1 failed, 1 total"
2020
local assertions_summary="Assertions: 0 failed, 0 total"
2121

tests/acceptance/bashunit_setup_error_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function test_bashunit_when_set_up_errors() {
1515

1616
local header_line="Running $fixture"
1717
local error_line="✗ Error: Set up"
18-
local message_line=" $fixture: line 4: invalid_function_name: command not found"
18+
local message_line="invalid_function_name"
1919
local tests_summary="Tests: 1 failed, 1 total"
2020
local assertions_summary="Assertions: 0 failed, 0 total"
2121

tests/acceptance/bashunit_teardown_after_script_error_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function test_bashunit_when_tear_down_after_script_errors() {
1515

1616
local header_line="Running $fixture"
1717
local error_line="✗ Error: Tear down after script"
18-
local message_line=" $fixture: line 4: missing_cleanup_command: command not found"
18+
local message_line="missing_cleanup_command"
1919
local tests_summary="Tests: 1 passed, 1 failed, 2 total"
2020
local assertions_summary="Assertions: 1 passed, 0 failed, 1 total"
2121

tests/acceptance/bashunit_teardown_error_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function test_bashunit_when_tear_down_errors() {
1515

1616
local header_line="Running $fixture"
1717
local error_line="✗ Error: Tear down"
18-
local message_line=" $fixture: line 4: invalid_function_name: command not found"
18+
local message_line="invalid_function_name"
1919
local tests_summary="Tests: 1 failed, 1 total"
2020
local assertions_summary="Assertions: 0 failed, 0 total"
2121

0 commit comments

Comments
 (0)