mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
Renamed preferences setup and teardown test functions
This commit is contained in:
parent
788fc48b1d
commit
b231133f9b
@ -10,7 +10,7 @@
|
||||
#include "common.h"
|
||||
#include "config/preferences.h"
|
||||
|
||||
void create_config_file(void **state)
|
||||
void init_preferences(void **state)
|
||||
{
|
||||
setenv("XDG_CONFIG_HOME", "./tests/files/xdg_config_home", 1);
|
||||
gchar *xdg_config = xdg_get_config_home();
|
||||
@ -30,7 +30,7 @@ void create_config_file(void **state)
|
||||
}
|
||||
}
|
||||
|
||||
void delete_config_file(void **state)
|
||||
void close_preferences(void **state)
|
||||
{
|
||||
prefs_close();
|
||||
remove("./tests/files/xdg_config_home/profanity/profrc");
|
||||
|
@ -1,2 +1,2 @@
|
||||
void create_config_file(void **state);
|
||||
void delete_config_file(void **state);
|
||||
void init_preferences(void **state);
|
||||
void close_preferences(void **state);
|
||||
|
@ -333,62 +333,62 @@ int main(int argc, char* argv[]) {
|
||||
unit_test(cmd_statuses_shows_usage_when_bad_chat_setting),
|
||||
unit_test(cmd_statuses_shows_usage_when_bad_muc_setting),
|
||||
unit_test_setup_teardown(cmd_statuses_console_sets_all,
|
||||
create_config_file,
|
||||
delete_config_file),
|
||||
init_preferences,
|
||||
close_preferences),
|
||||
unit_test_setup_teardown(cmd_statuses_console_sets_online,
|
||||
create_config_file,
|
||||
delete_config_file),
|
||||
init_preferences,
|
||||
close_preferences),
|
||||
unit_test_setup_teardown(cmd_statuses_console_sets_none,
|
||||
create_config_file,
|
||||
delete_config_file),
|
||||
init_preferences,
|
||||
close_preferences),
|
||||
unit_test_setup_teardown(cmd_statuses_chat_sets_all,
|
||||
create_config_file,
|
||||
delete_config_file),
|
||||
init_preferences,
|
||||
close_preferences),
|
||||
unit_test_setup_teardown(cmd_statuses_chat_sets_online,
|
||||
create_config_file,
|
||||
delete_config_file),
|
||||
init_preferences,
|
||||
close_preferences),
|
||||
unit_test_setup_teardown(cmd_statuses_chat_sets_none,
|
||||
create_config_file,
|
||||
delete_config_file),
|
||||
init_preferences,
|
||||
close_preferences),
|
||||
unit_test_setup_teardown(cmd_statuses_muc_sets_on,
|
||||
create_config_file,
|
||||
delete_config_file),
|
||||
init_preferences,
|
||||
close_preferences),
|
||||
unit_test_setup_teardown(cmd_statuses_muc_sets_off,
|
||||
create_config_file,
|
||||
delete_config_file),
|
||||
init_preferences,
|
||||
close_preferences),
|
||||
};
|
||||
|
||||
const UnitTest preferences_tests[] = {
|
||||
unit_test_setup_teardown(statuses_console_defaults_to_all,
|
||||
create_config_file,
|
||||
delete_config_file),
|
||||
init_preferences,
|
||||
close_preferences),
|
||||
unit_test_setup_teardown(statuses_chat_defaults_to_all,
|
||||
create_config_file,
|
||||
delete_config_file),
|
||||
init_preferences,
|
||||
close_preferences),
|
||||
unit_test_setup_teardown(statuses_muc_defaults_to_on,
|
||||
create_config_file,
|
||||
delete_config_file),
|
||||
init_preferences,
|
||||
close_preferences),
|
||||
};
|
||||
|
||||
const UnitTest server_events_tests[] = {
|
||||
unit_test_setup_teardown(console_doesnt_show_online_presence_when_set_none,
|
||||
create_config_file,
|
||||
delete_config_file),
|
||||
init_preferences,
|
||||
close_preferences),
|
||||
unit_test_setup_teardown(console_shows_online_presence_when_set_online,
|
||||
create_config_file,
|
||||
delete_config_file),
|
||||
init_preferences,
|
||||
close_preferences),
|
||||
unit_test_setup_teardown(console_shows_online_presence_when_set_all,
|
||||
create_config_file,
|
||||
delete_config_file),
|
||||
init_preferences,
|
||||
close_preferences),
|
||||
unit_test_setup_teardown(console_doesnt_show_dnd_presence_when_set_none,
|
||||
create_config_file,
|
||||
delete_config_file),
|
||||
init_preferences,
|
||||
close_preferences),
|
||||
unit_test_setup_teardown(console_doesnt_show_dnd_presence_when_set_online,
|
||||
create_config_file,
|
||||
delete_config_file),
|
||||
init_preferences,
|
||||
close_preferences),
|
||||
unit_test_setup_teardown(console_shows_dnd_presence_when_set_all,
|
||||
create_config_file,
|
||||
delete_config_file),
|
||||
init_preferences,
|
||||
close_preferences),
|
||||
};
|
||||
|
||||
const UnitTest cmd_alias_tests[] = {
|
||||
@ -397,20 +397,20 @@ int main(int argc, char* argv[]) {
|
||||
unit_test(cmd_alias_remove_shows_usage_when_no_args),
|
||||
unit_test(cmd_alias_show_usage_when_invalid_subcmd),
|
||||
unit_test_setup_teardown(cmd_alias_add_adds_alias,
|
||||
create_config_file,
|
||||
delete_config_file),
|
||||
init_preferences,
|
||||
close_preferences),
|
||||
unit_test_setup_teardown(cmd_alias_add_shows_message_when_exists,
|
||||
create_config_file,
|
||||
delete_config_file),
|
||||
init_preferences,
|
||||
close_preferences),
|
||||
unit_test_setup_teardown(cmd_alias_remove_removes_alias,
|
||||
create_config_file,
|
||||
delete_config_file),
|
||||
init_preferences,
|
||||
close_preferences),
|
||||
unit_test_setup_teardown(cmd_alias_remove_shows_message_when_no_alias,
|
||||
create_config_file,
|
||||
delete_config_file),
|
||||
init_preferences,
|
||||
close_preferences),
|
||||
unit_test_setup_teardown(cmd_alias_list_shows_all_aliases,
|
||||
create_config_file,
|
||||
delete_config_file),
|
||||
init_preferences,
|
||||
close_preferences),
|
||||
};
|
||||
|
||||
int bak, new;
|
||||
|
Loading…
Reference in New Issue
Block a user