Merge upstream/master into merge/upstream-full
Some checks failed
CI Code / Check coding style (pull_request) Failing after 7s
CI Code / Check spelling (pull_request) Successful in 17s
CI Code / Linux (debian) (pull_request) Successful in 7m1s
CI Code / Linux (ubuntu) (pull_request) Successful in 7m44s
CI Code / Code Coverage (pull_request) Successful in 7m35s
Lint / DCO (pull_request) Failing after 7s
Lint / conventional commits (pull_request) Failing after 45s
CI Code / Linux (arch) (pull_request) Successful in 9m23s
Build / ubuntu | func | signal (pull_request) Has been cancelled
Lint / coding style (pull_request) Has been cancelled
Lint / spellcheck (pull_request) Has been cancelled
Build / cygwin / build only (pull_request) Has been cancelled
CodeQL / analyze (pull_request) Has been cancelled

Merge profanity-im/profanity master (373 commits) into cproof fork.

Source changes (manual merge):
- src/command/: cmd_defs, cmd_funcs, cmd_ac — upstream g_new0, auto_gchar,
  launch_editor callback; keep our XEP-0308 LMC, force-encryption, CWE-134
- src/config/: preferences, tlscerts, account — upstream UNIQUE dedup,
  dynamic pad capacity; keep our db_history_result_t, scroll logic
- src/database.*: upstream g_new0 memory mgmt; keep our return types,
  add null-check fix for msg->timestamp
- src/omemo/, src/pgp/: upstream _gpgme_key_get_email, g_new0;
  keep our replace_id in omemo_on_message_send
- src/tools/: editor, http_upload, bookmark_ignore — upstream launch_editor
  callback API
- src/ui/: console, window, chatwin, mucwin, inputwin, buffer —
  upstream win_warn_needed/sent dedup, PAD_MIN_HEIGHT dynamic pads;
  keep our y_start_pos scroll, _truncate_datetime_suffix
- src/xmpp/: message, stanza, presence, roster_list, iq, session —
  upstream connection_get_available_resources; keep our LMC stanza logic
- src/common.c: fix format-security (cons_show)

Build system:
- Makefile.am: updated test paths to subdirectory structure, added
  test_cmd_ac, test_forced_encryption
- Restored autotools files deleted by upstream meson migration:
  bootstrap.sh, autogen.sh, m4/ax_valgrind_check.m4, configure-debug

Tests:
- Unit tests: upstream unittests.c base + our forced_encryption tests
  (482 passed, 0 failed across all 4 configurations)
- Functional tests: kept our version (93 passed, 0 failed)
  upstream version requires stbbr_for_xmlns not yet in our stabber fork
- Updated test stubs: stub_xmpp.c, stub_omemo.c from upstream

Compile fixes:
- src/common.c: cons_show(errmsg) -> cons_show("%s", errmsg)
- src/database.c: null-check before msg->timestamp access
- src/ui/console.c: size_t -> (int) cast for format width
- src/config/tlscerts.c: %d -> %zu for size_t
This commit is contained in:
2026-04-11 13:12:23 +03:00
306 changed files with 10661 additions and 9359 deletions

View File

@@ -0,0 +1,90 @@
/*
* test_i18n.c
*
* Copyright (C) 2026 Michael Vetter <jubalh@iodoru.org>
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#include <glib.h>
#include "prof_cmocka.h"
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stabber.h>
#include "proftest.h"
void
i18n_msg_nickname(void** state)
{
// Connect with a roster containing a UTF-8 nickname: Σωκράτης (Socrates)
prof_connect_with_roster(
"<item jid='socrates@localhost' subscription='both' name='Σωκράτης'/>"
"<item jid='buddy2@localhost' subscription='both' name='Buddy2'/>");
// Test that we can /msg the UTF-8 nickname successfully.
// This verifies that the UI and command parsing handle UTF-8.
prof_input("/msg Σωκράτης Hello");
// Check if we switched to the socrates window
assert_true(prof_output_regex("socrates@localhost"));
}
void
i18n_win_nickname(void** state)
{
prof_connect_with_roster(
"<item jid='socrates@localhost' subscription='both' name='Σωκράτης'/>");
// Open a chat with Socrates
prof_input("/msg Σωκράτης");
assert_true(prof_output_regex("socrates@localhost"));
// Switch back to console
prof_input("/win 1");
assert_true(prof_output_regex("Console"));
// Switch to Socrates window using name
prof_input("/win Σωκράτης");
assert_true(prof_output_regex("socrates@localhost"));
}
void
i18n_autocomplete_tab_utf8(void** state)
{
prof_connect_with_roster(
"<item jid='socrates@localhost' subscription='both' name='Σωκράτης'/>");
prof_send_raw("/msg Σω");
// TAB for completion
prof_send_raw("\t");
prof_input(" Hello");
// If autocompletion worked, we should be in the Socrates window
assert_true(prof_output_regex("socrates@localhost"));
// And stabber should have received the message
assert_true(stbbr_received(
"<message to='socrates@localhost' id='*' type='chat'>"
"<body>Hello</body>"
"</message>"));
}
void
i18n_autocomplete_tab_latin(void** state)
{
prof_connect_with_roster(
"<item jid='plato@localhost' subscription='both' name='Plato'/>");
prof_send_raw("/msg Pl");
prof_send_raw("\t");
prof_input(" Hello");
assert_true(prof_output_regex("plato@localhost"));
assert_true(stbbr_received(
"<message to='plato@localhost' id='*' type='chat'>"
"<body>Hello</body>"
"</message>"));
}

View File

@@ -0,0 +1,11 @@
/*
* test_i18n.h
*
* Copyright (C) 2026 Michael Vetter <jubalh@iodoru.org>
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
void i18n_msg_nickname(void** state);
void i18n_win_nickname(void** state);
void i18n_autocomplete_tab_utf8(void** state);
void i18n_autocomplete_tab_latin(void** state);