Browse Source

Create signed test channel with its final invitation title

master
evgeny 2 days ago
parent
commit
d14babea33
  1. 7
      tests/test_dm_invite.c

7
tests/test_dm_invite.c

@ -169,11 +169,10 @@ int main(void) {
uint64_t deadline = get_time_tb() + 30000;
while (!first.ready && get_time_tb() < deadline) uasync_poll(ua, 100);
CHECK(first.ready == 1 && !join_link(ua, first.link), "join common source group");
chat_core_create_channel_auto(nodes[0], "target");
CHECK(!scalar(nodes[0], "SELECT channel_id FROM channels WHERE name='target'", &target), "create different target group");
chat_core_create_channel_auto(nodes[0], "target \"группа\"\n<>&");
CHECK(!scalar(nodes[0], "SELECT channel_id FROM channels WHERE name='target \"группа\"\n<>&'", &target),
"create target group with Unicode, quotes and newline in signed title");
CHECK(target != source && !message_count(), "initial empty PM");
CHECK(sqlite3_exec(nodes[0]->topo_sqlite_db, "UPDATE channels SET name='target \"группа\"\n<>&' WHERE name='target'",
NULL, NULL, NULL) == SQLITE_OK, "group title with Unicode, quotes and newline");
char target_id[64]; snprintf(target_id, sizeof(target_id), "%llu", (unsigned long long)target);
for (int i = 0; i < 5; i++) {
char text[64]; snprintf(text, sizeof(text), "history before invitation %d", i);

Loading…
Cancel
Save