Thu, 23 Feb 2023 01:01:07 -0600
Add an error property to PurpleMessage
There are a number of ways that an individual message can fail, and it would be
nice to let the user interface know that it failed, so that the user can attempt
to resend.
Testing Done:
Ran the unit tests (that I just added)
Bugs closed: PIDGIN-17757
Reviewed at https://reviews.imfreedom.org/r/2234/
|
38534
28747a3cea35
Switch GnuTLS/NSS for Nettle in Meson build.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38492
diff
changeset
|
1 | PROGS = [ |
|
39974
cea80de2f5ac
Add some unit tests around purple_account_option_copy
Gary Kramlich <grim@reaperworld.com>
parents:
39484
diff
changeset
|
2 | 'account_option', |
|
41181
e859c41d8996
Create the PurpleAccountManager API
Gary Kramlich <grim@reaperworld.com>
parents:
41176
diff
changeset
|
3 | 'account_manager', |
|
41514
a96768bacb59
Create PurpleAuthorizationRequest and use it for notifications.
Gary Kramlich <grim@reaperworld.com>
parents:
41493
diff
changeset
|
4 | 'authorization_request', |
|
39975
f691f3812205
Add some unit tests for the circular buffer.. they're not great, was just trying to test somethings
Gary Kramlich <grim@reaperworld.com>
parents:
39484
diff
changeset
|
5 | 'circular_buffer', |
|
41739
f589ceec0172
Create the new PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
41736
diff
changeset
|
6 | 'contact', |
|
41948
6d844d2faff1
Split PurpleContactInfo out of PurpleContact
Gary Kramlich <grim@reaperworld.com>
parents:
41888
diff
changeset
|
7 | 'contact_info', |
|
41754
abf413211063
Create the new PurpleContactManager
Gary Kramlich <grim@reaperworld.com>
parents:
41749
diff
changeset
|
8 | 'contact_manager', |
|
41809
94c31400486a
Don't use the default credential manager while unit testing aside from the default manager tests
Gary Kramlich <grim@reaperworld.com>
parents:
41804
diff
changeset
|
9 | 'credential_manager', |
|
40548
42556c49e1e2
Add PurpleCredentialProvider as the first piece to replace the existing keyring api.
Gary Kramlich <grim@reaperworld.com>
parents:
40351
diff
changeset
|
10 | 'credential_provider', |
|
41090
741992355ead
GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
41040
diff
changeset
|
11 | 'history_adapter', |
|
741992355ead
GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
41040
diff
changeset
|
12 | 'history_manager', |
|
38534
28747a3cea35
Switch GnuTLS/NSS for Nettle in Meson build.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38492
diff
changeset
|
13 | 'image', |
|
40351
79cbdc5c5989
Add some unit tests for key value pairs
Gary Kramlich <grim@reaperworld.com>
parents:
39979
diff
changeset
|
14 | 'keyvaluepair', |
|
40564
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
40548
diff
changeset
|
15 | 'markup', |
|
41403
0186ae21071f
Add purple_menu_populate_dynamic_targets to dynamically update GMenu's
Gary Kramlich <grim@reaperworld.com>
parents:
41243
diff
changeset
|
16 | 'menu', |
|
42078
979d202488d0
Add an error property to PurpleMessage
Gary Kramlich <grim@reaperworld.com>
parents:
42060
diff
changeset
|
17 | 'message', |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
41403
diff
changeset
|
18 | 'notification', |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
41403
diff
changeset
|
19 | 'notification_manager', |
|
41749
c22448f50d5d
Create PurplePerson.
Gary Kramlich <grim@reaperworld.com>
parents:
41739
diff
changeset
|
20 | 'person', |
|
42051
18adb1710a54
Add read-only properties for primitive and message to PurplePresence
Gary Kramlich <grim@reaperworld.com>
parents:
42008
diff
changeset
|
21 | 'presence', |
|
41884
36684da1e60d
Add async function to PurpleProtocol for testing whether or not connections are possible
Gary Kramlich <grim@reaperworld.com>
parents:
41809
diff
changeset
|
22 | 'protocol', |
|
39974
cea80de2f5ac
Add some unit tests around purple_account_option_copy
Gary Kramlich <grim@reaperworld.com>
parents:
39484
diff
changeset
|
23 | 'protocol_action', |
|
38829
2be373489ef1
Start of unit tests for the PurpleProtocolXferInterface
Gary Kramlich <grim@reaperworld.com>
parents:
38534
diff
changeset
|
24 | 'protocol_xfer', |
|
41242
0343173db2f6
added basic tests for path based functions
ivanhoe <107501-ivanhoe@users.noreply.gitlab.com>
parents:
41181
diff
changeset
|
25 | 'purplepath', |
|
39166
7119cb1afdb8
tests: Add tests for PurpleQueuedOutputStream
Mike Ruprecht <cmaiku@gmail.com>
parents:
38937
diff
changeset
|
26 | 'queued_output_stream', |
|
42060
d55b605fdafb
Add purple_strmatches and move purple_person_matches and purple_contact_info_matches to it
Gary Kramlich <grim@reaperworld.com>
parents:
42051
diff
changeset
|
27 | 'str', |
|
41736
d78c0951ea2c
Create the PurpleTags object for handling tags
Gary Kramlich <grim@reaperworld.com>
parents:
41734
diff
changeset
|
28 | 'tags', |
|
38534
28747a3cea35
Switch GnuTLS/NSS for Nettle in Meson build.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38492
diff
changeset
|
29 | 'util', |
|
41040
4be2eda9548a
Create PurpleWhiteboardManager for managing whiteboards
Gary Kramlich <grim@reaperworld.com>
parents:
41034
diff
changeset
|
30 | 'whiteboard_manager', |
|
4be2eda9548a
Create PurpleWhiteboardManager for managing whiteboards
Gary Kramlich <grim@reaperworld.com>
parents:
41034
diff
changeset
|
31 | 'xmlnode', |
|
38534
28747a3cea35
Switch GnuTLS/NSS for Nettle in Meson build.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38492
diff
changeset
|
32 | ] |
|
38831
d260f3b61831
The start of a ui for unit testing
Gary Kramlich <grim@reaperworld.com>
parents:
38830
diff
changeset
|
33 | |
|
38832
7ad7854d8e60
Create a very basic ui for testing
Gary Kramlich <grim@reaperworld.com>
parents:
38831
diff
changeset
|
34 | test_ui = static_library( |
|
7ad7854d8e60
Create a very basic ui for testing
Gary Kramlich <grim@reaperworld.com>
parents:
38831
diff
changeset
|
35 | 'test-ui', |
|
7ad7854d8e60
Create a very basic ui for testing
Gary Kramlich <grim@reaperworld.com>
parents:
38831
diff
changeset
|
36 | 'test_ui.c', |
|
7ad7854d8e60
Create a very basic ui for testing
Gary Kramlich <grim@reaperworld.com>
parents:
38831
diff
changeset
|
37 | 'test_ui.h', |
|
7ad7854d8e60
Create a very basic ui for testing
Gary Kramlich <grim@reaperworld.com>
parents:
38831
diff
changeset
|
38 | c_args: [ |
|
41107
1570d8844e9a
Enable structured logging in libpurple
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41090
diff
changeset
|
39 | '-DTEST_DATA_DIR="@0@/data"'.format(meson.current_source_dir()), |
|
1570d8844e9a
Enable structured logging in libpurple
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41090
diff
changeset
|
40 | '-DG_LOG_USE_STRUCTURED', |
|
1570d8844e9a
Enable structured logging in libpurple
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41090
diff
changeset
|
41 | '-DG_LOG_DOMAIN="Purple-TestUI"', |
|
38832
7ad7854d8e60
Create a very basic ui for testing
Gary Kramlich <grim@reaperworld.com>
parents:
38831
diff
changeset
|
42 | ], |
|
39354
db17ba548304
libpurple: Drop DBus API bindings
Mike Ruprecht <cmaiku@gmail.com>
parents:
39166
diff
changeset
|
43 | dependencies: [libpurple_dep, glib] |
|
38832
7ad7854d8e60
Create a very basic ui for testing
Gary Kramlich <grim@reaperworld.com>
parents:
38831
diff
changeset
|
44 | ) |
|
7ad7854d8e60
Create a very basic ui for testing
Gary Kramlich <grim@reaperworld.com>
parents:
38831
diff
changeset
|
45 | |
|
41493
06dcfb1cc1b2
Set XDG_CONFIG_DIR for all unittests so they can run in a silo
Gary Kramlich <grim@reaperworld.com>
parents:
41433
diff
changeset
|
46 | testenv.set('XDG_CONFIG_HOME', meson.current_build_dir() / 'config') |
|
06dcfb1cc1b2
Set XDG_CONFIG_DIR for all unittests so they can run in a silo
Gary Kramlich <grim@reaperworld.com>
parents:
41433
diff
changeset
|
47 | |
|
38534
28747a3cea35
Switch GnuTLS/NSS for Nettle in Meson build.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38492
diff
changeset
|
48 | foreach prog : PROGS |
|
41888
9db0b73c8fab
Take advantage of f-strings in Meson
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41884
diff
changeset
|
49 | e = executable(f'test_@prog@', f'test_@prog@.c', |
|
38848
22e32372b906
Fix a few typos and cleanup some whitespace
Gary Kramlich <grim@reaperworld.com>
parents:
38832
diff
changeset
|
50 | c_args : [ |
|
22e32372b906
Fix a few typos and cleanup some whitespace
Gary Kramlich <grim@reaperworld.com>
parents:
38832
diff
changeset
|
51 | '-DTEST_DATA_DIR="@0@/data"'.format(meson.current_source_dir()) |
|
22e32372b906
Fix a few typos and cleanup some whitespace
Gary Kramlich <grim@reaperworld.com>
parents:
38832
diff
changeset
|
52 | ], |
|
39354
db17ba548304
libpurple: Drop DBus API bindings
Mike Ruprecht <cmaiku@gmail.com>
parents:
39166
diff
changeset
|
53 | dependencies : [libpurple_dep, glib], |
|
38832
7ad7854d8e60
Create a very basic ui for testing
Gary Kramlich <grim@reaperworld.com>
parents:
38831
diff
changeset
|
54 | link_with: test_ui, |
|
7ad7854d8e60
Create a very basic ui for testing
Gary Kramlich <grim@reaperworld.com>
parents:
38831
diff
changeset
|
55 | ) |
|
41493
06dcfb1cc1b2
Set XDG_CONFIG_DIR for all unittests so they can run in a silo
Gary Kramlich <grim@reaperworld.com>
parents:
41433
diff
changeset
|
56 | test(prog, e, |
|
06dcfb1cc1b2
Set XDG_CONFIG_DIR for all unittests so they can run in a silo
Gary Kramlich <grim@reaperworld.com>
parents:
41433
diff
changeset
|
57 | env: testenv, |
|
06dcfb1cc1b2
Set XDG_CONFIG_DIR for all unittests so they can run in a silo
Gary Kramlich <grim@reaperworld.com>
parents:
41433
diff
changeset
|
58 | ) |
|
38439
03f1a1642a68
Add meson build for libpurple only.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff
changeset
|
59 | endforeach |
|
41734
a708bd1edc77
Clean up setting handling for the credential manager and make its unit tests don't mess up the others
Gary Kramlich <grim@reaperworld.com>
parents:
41683
diff
changeset
|
60 | |
|
42008
ae3fa963c1b3
Add animation support to PurpleAvatar
Gary Kramlich <grim@reaperworld.com>
parents:
41966
diff
changeset
|
61 | subdir('avatar') |
|
41804
36c3c3cd2402
Add some api for handling SQLite3 migrations
Gary Kramlich <grim@reaperworld.com>
parents:
41754
diff
changeset
|
62 | subdir('sqlite3') |