revert: restore pre-upstream-merge baseline (tree of 3b673150b)
All checks were successful
CI Code / Check spelling (pull_request) Successful in 18s
CI Code / Check coding style (pull_request) Successful in 30s
CI Code / Linux (ubuntu) (pull_request) Successful in 4m51s
CI Code / Linux (debian) (pull_request) Successful in 6m59s
CI Code / Linux (arch) (pull_request) Successful in 10m12s
CI Code / Code Coverage (pull_request) Successful in 6m44s
All checks were successful
CI Code / Check spelling (pull_request) Successful in 18s
CI Code / Check coding style (pull_request) Successful in 30s
CI Code / Linux (ubuntu) (pull_request) Successful in 4m51s
CI Code / Linux (debian) (pull_request) Successful in 6m59s
CI Code / Linux (arch) (pull_request) Successful in 10m12s
CI Code / Code Coverage (pull_request) Successful in 6m44s
Roll the tree back to the pre-merge tip3b673150b, undoing the upstream sync merge72f4f186d(303 files) and the 13 post-merge commits layered on top of it. Purpose: restore the last pre-sync baseline so the reported OMEMO/OTR encryption regressions can be reproduced against a known-good state and the upstream sync ruled in or out as the cause. Nothing is dropped from history; the merge and every post-merge commit remain reachable and can be cherry-picked back selectively. Baseline:3b673150bchore(chatlog): disable background message file logging (stage 1) Undoes merge:72f4f186dmerge: sync upstream profanity-im/profanity
This commit is contained in:
53
tests/unittests/test_cmd_sub.c
Normal file
53
tests/unittests/test_cmd_sub.c
Normal file
@@ -0,0 +1,53 @@
|
||||
#include "prof_cmocka.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "xmpp/xmpp.h"
|
||||
|
||||
#include "ui/ui.h"
|
||||
#include "ui/stub_ui.h"
|
||||
|
||||
#include "command/cmd_funcs.h"
|
||||
|
||||
#define CMD_SUB "/sub"
|
||||
|
||||
void
|
||||
cmd_sub_shows_message_when_not_connected(void** state)
|
||||
{
|
||||
gchar* args[] = { NULL };
|
||||
|
||||
will_return(connection_get_status, JABBER_DISCONNECTED);
|
||||
|
||||
expect_cons_show("You are currently not connected.");
|
||||
|
||||
gboolean result = cmd_sub(NULL, CMD_SUB, args);
|
||||
assert_true(result);
|
||||
}
|
||||
|
||||
void
|
||||
cmd_sub_shows_usage_when_no_arg(void** state)
|
||||
{
|
||||
gchar* args[] = { NULL };
|
||||
|
||||
will_return(connection_get_status, JABBER_CONNECTED);
|
||||
|
||||
expect_string(cons_bad_cmd_usage, cmd, CMD_SUB);
|
||||
|
||||
gboolean result = cmd_sub(NULL, CMD_SUB, args);
|
||||
assert_true(result);
|
||||
}
|
||||
|
||||
void
|
||||
test_cmd_sub_malformed_jid(void** state)
|
||||
{
|
||||
ProfWin win;
|
||||
win.type = WIN_CONSOLE;
|
||||
gchar* args[] = { "request", "@example.com" };
|
||||
|
||||
will_return(connection_get_status, JABBER_CONNECTED);
|
||||
|
||||
expect_cons_show("Malformed JID: @example.com");
|
||||
gboolean result = cmd_sub((ProfWin*)&win, CMD_SUB, args);
|
||||
assert_true(result);
|
||||
}
|
||||
Reference in New Issue
Block a user