diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2018-04-05 22:35:25 +0200 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2018-04-05 22:35:35 +0200 |
commit | c43b487246fdfd2ddc5c794763b18255ac6a318e (patch) | |
tree | c5b2b5ef837e9e796842155a6f7943745c61d135 /tests/blogc-git-receiver/check_post_receive.c | |
parent | 0a7f6a2659b363e1d68202b9fd863b57f7420f4f (diff) | |
download | blogc-c43b487246fdfd2ddc5c794763b18255ac6a318e.tar.gz blogc-c43b487246fdfd2ddc5c794763b18255ac6a318e.tar.bz2 blogc-c43b487246fdfd2ddc5c794763b18255ac6a318e.zip |
*: use squareball
yeah, changed my mind again :)
Diffstat (limited to 'tests/blogc-git-receiver/check_post_receive.c')
-rw-r--r-- | tests/blogc-git-receiver/check_post_receive.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/blogc-git-receiver/check_post_receive.c b/tests/blogc-git-receiver/check_post_receive.c index 5d2d742..ed582e9 100644 --- a/tests/blogc-git-receiver/check_post_receive.c +++ b/tests/blogc-git-receiver/check_post_receive.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/post-receive.h" @@ -24,20 +24,20 @@ __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_post_receive_get_config_section(void **state) { - bc_error_t *err = NULL; + sb_error_t *err = NULL; - 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_post_receive_get_config_section(config, "/home/blogc/repos/foo.git", "/home/blogc")); - bc_config_free(config); + sb_config_free(config); will_return(__wrap_realpath, NULL); will_return(__wrap_realpath, "/home/blogc/repos/bar.git"); @@ -51,13 +51,13 @@ test_post_receive_get_config_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_post_receive_get_config_section(config, "/home/blogc/repos/bar.git", "/home/blogc"); assert_string_equal(s, "repo:bar.git"); free(s); - bc_config_free(config); + sb_config_free(config); will_return(__wrap_realpath, NULL); will_return(__wrap_realpath, "/home/blogc/repos/asd/bar.git"); @@ -71,13 +71,13 @@ test_post_receive_get_config_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_post_receive_get_config_section(config, "/home/blogc/repos/asd/bar.git", "/home/blogc"); assert_string_equal(s, "repo:asd/bar.git"); free(s); - bc_config_free(config); + sb_config_free(config); } |