diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2019-09-02 23:38:48 +0200 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2019-09-02 23:51:15 +0200 |
commit | 4763814c683c50f8a3697b74e764f19c3dacccd5 (patch) | |
tree | 386ff43f024705a32310b882f2161b5f86d8820a /tests/blogc-git-receiver | |
parent | c12bdb94ecdc44f200a8030dfde4a5ec46053ea6 (diff) | |
download | blogc-feature/squareball.tar.gz blogc-feature/squareball.tar.bz2 blogc-feature/squareball.zip |
migrate codebase to use squareball. again :)feature/squareball
Diffstat (limited to 'tests/blogc-git-receiver')
-rw-r--r-- | tests/blogc-git-receiver/check_settings.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/blogc-git-receiver/check_settings.c b/tests/blogc-git-receiver/check_settings.c index cb12037..6de5b32 100644 --- a/tests/blogc-git-receiver/check_settings.c +++ b/tests/blogc-git-receiver/check_settings.c @@ -12,8 +12,8 @@ #include <cmocka.h> #include <string.h> #include <stdlib.h> -#include "../../src/common/config-parser.h" -#include "../../src/common/utils.h" +#include <squareball.h> + #include "../../src/blogc-git-receiver/settings.h" @@ -24,21 +24,21 @@ __wrap_realpath(const char *path, char *resolved_path) if (real_path == NULL) return NULL; assert_string_equal(path, real_path); - return bc_strdup(real_path); + return sb_strdup(real_path); } static void test_settings_get_section(void **state) { - bc_error_t *err = NULL; + sb_error_t *err = NULL; setenv("HOME", "/home/blogc", 1); - bc_config_t *config = bc_config_parse("", 0, NULL, &err); + sb_config_t *config = sb_config_parse("", 0, NULL, &err); assert_null(err); assert_null(bgr_settings_get_section(config, "/home/blogc/repos/foo.git")); - bc_config_free(config); + sb_config_free(config); will_return(__wrap_realpath, NULL); will_return(__wrap_realpath, "/home/blogc/repos/bar.git"); @@ -52,12 +52,12 @@ test_settings_get_section(void **state) "[repo:baz.git]\n" "mirror = baz\n" "\n"; - config = bc_config_parse(conf, strlen(conf), NULL, &err); + config = sb_config_parse(conf, strlen(conf), NULL, &err); assert_null(err); char *s = bgr_settings_get_section(config, "/home/blogc/repos/bar.git"); assert_string_equal(s, "repo:bar.git"); free(s); - bc_config_free(config); + sb_config_free(config); setenv("BLOGC_GIT_RECEIVER_BASE_DIR", "/home/bola", 1); will_return(__wrap_realpath, NULL); @@ -72,12 +72,12 @@ test_settings_get_section(void **state) "[repo:asd/baz.git]\n" "mirror = baz\n" "\n"; - config = bc_config_parse(conf, strlen(conf), NULL, &err); + config = sb_config_parse(conf, strlen(conf), NULL, &err); assert_null(err); s = bgr_settings_get_section(config, "/home/bola/repos/asd/bar.git"); assert_string_equal(s, "repo:asd/bar.git"); free(s); - bc_config_free(config); + sb_config_free(config); } |