Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable unit test requiring isatty() #150

Merged
merged 1 commit into from
Mar 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions test/test_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,21 +185,6 @@ static void flog_config_with_long_subsystem_option_and_no_subsystem_fails(void *
assert_int_equal(error, FLOG_ERROR_OPTS);
}

static void
flog_config_new_with_stdin_tty_and_no_message_args_fails(void **state) {
FlogError error = TEST_ERROR;
MOCK_ARGS(
TEST_PROGRAM_NAME,
TEST_OPTION_LEVEL_SHORT,
TEST_OPTION_LEVEL_VALUE_INFO
)

FlogConfig *config = flog_config_new(mock_argc, mock_argv, &error);

assert_null(config);
assert_int_equal(error, FLOG_ERROR_MSG);
}

static void
flog_config_new_with_message_succeeds(void **state) {
FlogError error = TEST_ERROR;
Expand Down Expand Up @@ -487,7 +472,6 @@ int main(void) {
cmocka_unit_test(flog_config_new_with_long_category_opt_and_no_subsystem_opt_fails),
cmocka_unit_test(flog_config_with_short_subsystem_option_and_no_subsystem_fails),
cmocka_unit_test(flog_config_with_long_subsystem_option_and_no_subsystem_fails),
cmocka_unit_test(flog_config_new_with_stdin_tty_and_no_message_args_fails),

// flog_config_new() success tests
cmocka_unit_test(flog_config_new_with_message_succeeds),
Expand Down