summary refs log tree commit diff stats
Commit message (Expand)AuthorAgeFilesLines
...
* fixes broken ssl tests (#20181)ringabout2022-08-091-2/+2
* update the docs of arc following up #19749 (#19752)ringabout2022-08-081-2/+2
* fixes links in the readme (#20167)ringabout2022-08-071-2/+2
* [minor] don't find `"Hint: gc"` for action (#20170)ringabout2022-08-071-4/+2
* fixes #20153; do not escape `_` for mysql [backport] (#20164)ringabout2022-08-052-2/+5
* Improve error message for `strutils.addf` (#20157)konsumlamm2022-08-051-8/+8
* remove annoying dropdowns from the bug form (#20154)ringabout2022-08-051-147/+8
* Two broken links found (#20121)Sojin2022-08-041-2/+2
* Add bug form (#19913)Juan Carlos2022-08-044-88/+287
* Markdown code blocks part 3 (#20117)Andrey Makarov2022-08-045-283/+409
* fixes #20132; fixes the broken jsondoc comand [backport] (#20135)ringabout2022-08-043-1/+30
* Add client.close() in httpclient examples. (#20118)gecko2022-08-041-9/+25
* closes #20123;
#include <setjmp.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdlib.h>
#include <cmocka.h>
#include <glib.h>
#include <stdio.h>
#include <unistd.h>

#include "common.h"
#include "helpers.h"
#include "config/preferences.h"

#include "ui/stub_ui.h"
#include "xmpp/stub_xmpp.h"

void
reset_mocks(void **state)
{
    reset_ui_mocks();
    reset_xmpp_mocks();
}

void create_config_dir(void **state)
{
    setenv("XDG_CONFIG_HOME", "./tests/files/xdg_config_home", 1);
    gchar *xdg_config = xdg_get_config_home();

    GString *profanity_dir = g_string_new(xdg_config);
    g_string_append(profanity_dir, "/profanity");

    if (!mkdir_recursive(profanity_dir->str)) {
        assert_true(FALSE+6
* replace shallowcopy with move in ARC/ORC (#20061)flywind2022-07-181-6/+6
* niminst: support DESTDIR and quote variables (#20051)Anna2022-07-181-42/+45
* Improve rand(bool) (#20045)Antonis Geralis2022-07-181-2/+4
* epoll: correct mapping [backport] (#20058)Jacek Sieka2022-07-181-5/+14
* Fixed typo in std/os doc (#20054)LetThereBeLemons2022-07-181-1/+1
* fix `pthread_mutex_t` size (#20055)Jacek Sieka2022-07-181-1/+1
* Fixed errors in Nim Backend integration docs. (#20046)Don-Duong Quach2022-07-171-2/+3
* defines the `gcRefc` symbol which allows writing specific code for refc (#20009)flywind2022-07-173-1/+9
* Fix typo in line 456 (#20047)Peter Guld Leth2022-07-171-1/+1
* Display protocol name in exceptions raised by getProtoByName() (#19808)kraptor2022-07-161-1/+1
* Make imports/exports not be a dropdown in sidebar (#19907)Jake Leahy2022-07-163-9/+23
* testament: use full test name in skips [backport] (#19937)Jacek Sieka2022-07-161-7/+13
* Make `random.rand` work with `Ordinal` (#20043)Amjad Ben Hedhili2022-07-162-6/+10
pan> } } void close_preferences(void **state) { prefs_close(); remove("./tests/files/xdg_config_home/profanity/profrc"); remove_config_dir(state); rmdir("./tests/files"); } static GCompareFunc cmp_func; void glist_set_cmp(GCompareFunc func) { cmp_func = func; } int glist_contents_equal(const void *actual, const void *expected) { GList *ac = (GList *)actual; GList *ex = (GList *)expected; GList *p = ex; printf("\nExpected\n"); while(ex) { printf("\n\n%s\n", (char*)p->data); ex = g_list_next(ex); } printf("\n\n"); p = ac; printf("\nActual\n"); while(ac) { printf("\n\n%s\n", (char *)p->data); ac = g_list_next(ac); } printf("\n\n"); if (g_list_length(ex) != g_list_length(ac)) { return 0; } GList *ex_curr = ex; while (ex_curr != NULL) { if (g_list_find_custom(ac, ex_curr->data, cmp_func) == NULL) { return 0; } ex_curr = g_list_next(ex_curr); } return 1; }