summaryrefslogtreecommitdiff
path: root/tests/testattributes.c
Commit message (Collapse)AuthorAgeFilesLines
* Reinstate previous behavior or pango_attr_list_spliceattrlist-spliceMatthias Clasen2022-01-071-0/+18
| | | | | | | | | | If gap is zero, don't limit the inserted attributes; that does not make sense. Spell out the different use cases in the docs. Testcase included. Fixes: #653
* Use serialization api in testattributesMatthias Clasen2021-11-171-310/+337
|
* Add segmentation attributesbreak-tailoringMatthias Clasen2021-08-251-3/+13
| | | | | | | Add attributes that let us override word and sentence boundaries (and, indirectly, line breaks). Tests included.
* tests: Silence compiler warningsMatthias Clasen2021-08-221-0/+1
|
* testattributes: Assert properlyMatthias Clasen2021-08-221-18/+9
|
* tests: Add more attribute testsMatthias Clasen2021-08-221-0/+107
| | | | | Handle all attribute types when testing copying, and add tests for the binding helpers.
* TrivialMatthias Clasen2021-08-221-1/+1
| | | | Fix a comment
* markup: Add a text transform attributeMatthias Clasen2021-08-201-0/+1
| | | | | | Add a PangoTextTransform enum, a PangoAttribute to set it on runs of text, and support for parsing it out of markup.
* Add more testcases for pango_attr_list_changeattr-list-change-fixMatthias Clasen2021-07-091-9/+264
| | | | | | Add more cases to cover move of the branches in this complicated function. Among other things, this tests the fix in the previous commit.
* Improve attribute test infrastructureMatthias Clasen2021-07-091-92/+35
| | | | | | | | | | Make attribute_from_string() parse enum attribute values in the same way as PangoMarkup, and use it in the attribute tests. Still to do: Do the same for flags. The flags parsing function isn't exported, so this needs our tests to be statically linked.
* Add a testcase for pango_attr_list_changetest-for-564Matthias Clasen2021-07-091-0/+22
| | | | | This recreates the scenario described in #564. It works fine.
* tests: Add more attribute testsMatthias Clasen2021-06-281-1/+50
| | | | These improve test coverage for some corner cases.
* Add better attribute test infrastructureMatthias Clasen2021-06-281-226/+48
| | | | | | | Add a way to deserialize a PangoAttrList from a string, for less cumbersome tests. And use it in testattributes.
* Add another test for pango_attr_list_changeattrlist-testMatthias Clasen2021-06-191-0/+60
| | | | | This tests that we handle more cases of overlapping attributes properly.
* Fix a corner-case of pango_attr_list_splicefix-attribute-splicingMatthias Clasen2021-02-171-2/+36
| | | | | | | | | | | | | | When the 'other' list contains attributes that are unlimited or exceed the range given to pango_attr_list_splice, those attributes were 'leaking' out of the range. The visible effect of this is that the underline of preedit text extends outside the preedit in some GTK entries. Fix this by clipping the inserted attributes to the range. The documentation is not very explicit about this, but I believe this is the expected behavior. Tests included.
* Fix attr iterators with overlapping attributesfix-nested-attributesMatthias Clasen2020-09-171-0/+89
| | | | | | | | | | | | | This broke when PangoAttrIterator was changed to use an array for the stack of current attributes, in dec6c0868ef2c36. We were not always walking the array in the right order. The first attribute to check is at the *end* of the array. This showed up as misrendering in epsilon_0 example in gtk3-demo's text view markup demo. Test included.
* Fix crashes with empty attribute listsMatthias Clasen2020-06-221-0/+51
| | | | | | | | There were a few cases left where empty attribute lists could lead to crashes. This was observed causing crashes in gnumeric. Testcases included.
* Add another attribute list testMatthias Clasen2020-06-171-1/+67
| | | | | This captures the loss of color in the links demo in gtk4-demo with pango 1.45.2
* Add more pango_attr_list_equal testsMatthias Clasen2020-06-111-0/+6
| | | | Check with NULL and empty lists.
* CosmeticsMatthias Clasen2020-06-111-2/+2
|
* Add more attribute testsMatthias Clasen2020-06-101-0/+138
|
* tests: Add some tests for pango_attr_list_equalTimm Bäder2020-06-101-0/+71
|
* testattributes: Test iter on empty attr listTimm Bäder2020-06-081-0/+9
|
* testattributes: Properly free GStringTimm Bäder2020-06-081-1/+1
| | | | Not needed afterwards.
* tests: Handle new attribute valuesMatthias Clasen2019-10-311-0/+1
| | | | Test that new underline values work.
* tests: Handle new attributesMatthias Clasen2019-10-311-0/+2
|
* tests: Cover new attribute typesMatthias Clasen2019-08-041-0/+3
|
* Add a test for pango_attr_list_updateMatthias Clasen2019-07-191-0/+45
|
* tests: Use pango_attr_list_get_attributesMatthias Clasen2019-07-191-147/+96
|
* Some test updatesMatthias Clasen2019-07-141-61/+61
| | | | | Share the attribute printing code between all the tests, update expected output to match.
* testattributes: Make it work with --enable-debug=noMatthias Clasen2015-10-031-11/+11
| | | | | | | g_assert gets neutered by --enable-debug=no, which is not what we want in tests. Use g_assert_true instead. https://bugzilla.gnome.org/show_bug.cgi?id=755126
* Add tests for PangoAttributesMatthias Clasen2015-03-131-0/+630
These tests exercise PangoAttribute, PangoAttrList and PangoAttrIterator apis.