Tue, 31 Oct 2023 01:12:44 -0500
Create pidgin_text_buffer API for working with GtkTextBuffers
Currently we only implement _get_html and _get_html_range and only a subset of
html tags are identified properly. This was intentional as it's easy to add
additional tags and because we're also introducing testing to Pidgin in this
commit.
Testing Done:
Ran the unit tests under valgrind without issues.
Reviewed at https://reviews.imfreedom.org/r/2754/
|
42456
73bb1fae628c
Create pidgin_text_buffer API for working with GtkTextBuffers
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | PROGRAMS = [ |
|
73bb1fae628c
Create pidgin_text_buffer API for working with GtkTextBuffers
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | 'text_buffer', |
|
73bb1fae628c
Create pidgin_text_buffer API for working with GtkTextBuffers
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | ] |
|
73bb1fae628c
Create pidgin_text_buffer API for working with GtkTextBuffers
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | |
|
73bb1fae628c
Create pidgin_text_buffer API for working with GtkTextBuffers
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | TEST_WRAPPER = find_program('./test-wrapper.py', required: true) |
|
73bb1fae628c
Create pidgin_text_buffer API for working with GtkTextBuffers
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | |
|
73bb1fae628c
Create pidgin_text_buffer API for working with GtkTextBuffers
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | testenv.set('XDG_CONFIG_HOME', meson.current_build_dir() / 'config') |
|
73bb1fae628c
Create pidgin_text_buffer API for working with GtkTextBuffers
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | |
|
73bb1fae628c
Create pidgin_text_buffer API for working with GtkTextBuffers
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | foreach program : PROGRAMS |
|
73bb1fae628c
Create pidgin_text_buffer API for working with GtkTextBuffers
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | e = executable(f'test_@program@', f'test_@program@.c', |
|
73bb1fae628c
Create pidgin_text_buffer API for working with GtkTextBuffers
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | c_args : [ |
|
73bb1fae628c
Create pidgin_text_buffer API for working with GtkTextBuffers
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | '-DTEST_DATA_DIR="@0@/data"'.format(meson.current_source_dir()), |
|
73bb1fae628c
Create pidgin_text_buffer API for working with GtkTextBuffers
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | '-DTEST_CACHE_DIR="@0@/cache"'.format(meson.current_build_dir()), |
|
73bb1fae628c
Create pidgin_text_buffer API for working with GtkTextBuffers
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | ], |
|
73bb1fae628c
Create pidgin_text_buffer API for working with GtkTextBuffers
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | dependencies : [libpurple_dep, libpidgin_dep, glib, gtk], |
|
73bb1fae628c
Create pidgin_text_buffer API for working with GtkTextBuffers
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | ) |
|
73bb1fae628c
Create pidgin_text_buffer API for working with GtkTextBuffers
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | test(program, TEST_WRAPPER, args : e, is_parallel : false, env: testenv) |
|
73bb1fae628c
Create pidgin_text_buffer API for working with GtkTextBuffers
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | endforeach |