summaryrefslogtreecommitdiff
path: root/tests/layouts
Commit message (Collapse)AuthorAgeFilesLines
* Be more forgiving about attribute orderingMatthias Clasen2021-09-012-0/+113
| | | | | | | | | | | | We don't really have firm control over the way attributes are ordered in the list, so the assumtion that we see proper nesting for baseline shifts was a bit optimistic. Just look through all open stack items for a match, and remove that. Test included.
* Refine hyphenationMatthias Clasen2021-08-251-1/+1
| | | | | | | | Replace ‧ and | with a - when we break there. Update affected test output. Fixes: #603
* Reimplement pango_layout_move_cursor_visuallyMatthias Clasen2021-08-082-2/+2
| | | | | | | | Reimplement this function based on pango_layout_get_cursor_pos. This is a bit less efficient, but it fixes cases where the old implementation would get stuck. Fixes: #587, #585, #157
* itemize: Ignore width in horizontal contextignore-width-in-horizontal2Matthias Clasen2021-08-035-28/+61
| | | | | | | | | Changes in width only need to break runs in vertical context. Update tests and add a new test. Fixes: #503
* itemize: Fix up gravity state initializationgravity-fixMatthias Clasen2021-08-022-0/+42
| | | | | | | | itemize_state_init was setting gravity-related fields to their initial values too late, after update_attr_iterator has already set them to the values for the first run. Test included.
* break: Fix handling of tag sequencestests-and-fixesMatthias Clasen2021-07-071-1/+1
| | | | | | | | Correctly classify tag characters as Grapheme_Extend, so that we don't end up putting grapheme boundaries in the middle of tag sequences. Includes a test.
* tests: Add some more layout testsMatthias Clasen2021-07-076-0/+127
|
* tests: Check more layout propertiesMatthias Clasen2021-07-0626-0/+466
| | | | | | | | Allow setting more layout properties in test-layout, and check their values after setting them. Also print out directions and cursor positions. Update existing tests, and add more.
* Fix a thinkoMatthias Clasen2021-05-101-2/+2
| | | | | | | | | The commit message for d476d2a944500f8553 said "word boundaries", but the code checked for line breaks. That was wrong, since it also made hyphens disappear at SHY, where we very much want them. Update affected tests.
* layout: Don't insert hyphens at word boundariesword-break-hyphensMatthias Clasen2021-05-081-2/+2
| | | | | | | | | | We only want to insert hyphens when we are breaking inside a word. Update affected tests (hyphen-or-not shows up in the analysis flags in the output of test-layout). Fixes: #558
* Add a test for keycap sequencesfix-keycap-sequencesMatthias Clasen2020-09-172-0/+27
| | | | | This tests that we are not breaking items up in the middle of a keycap sequence.
* Try to make the layout test less sensitiveMatthias Clasen2020-06-102-2/+2
| | | | | | Try not to pick a width that makes line-breaking decisions depend on rounding. Lets see if this works better, it makes the test pass locally.
* Revert "tests: Update expected output"Matthias Clasen2020-06-102-0/+2
| | | | This reverts commit 4d8e71471984fb0fc147d1a64695ad5f18576fde.
* tests: Update expected outputTimm Bäder2020-06-082-2/+0
| | | | | We don't set an attribute list in these cases anymore, so reflect that in the output.
* Adjust expected test outputsMatthias Clasen2019-10-281-2/+2
| | | | The change is a harmless change in attribute list ordering.
* Pass the right attributes when shaping ellipsesMatthias Clasen2019-08-061-1/+1
| | | | | | | | | | | | | | | Now that we are splitting attributes into those that are relevant for itemization and shaping, we need to make sure to pass the right ones along when ellipsizing, or we risk picking a wildly mismatching font for the ellipsis run, causing things to shift vertically. Test included. Closes: https://gitlab.gnome.org/GNOME/pango/issues/397 Thanks to Jorge Luis Martinez Gomez for his help in tracking this down.
* layout: Flip the logic for attribute filteringMatthias Clasen2019-07-241-2/+2
| | | | | | | | | | | Instead of filtering out the attributes we don't want to influence itemization, explicitly filter only those attributes that we want to affect itemization. This makes us no longer break items for custom attributes, such as GtkTextAppearance attributes that are created by GtkTextLayout. Update expected output for layout testcases.
* Update expected test outputMatthias Clasen2019-07-201-13/+11
| | | | Recent changes changed breaks.
* Update expected test resultsMatthias Clasen2019-07-171-22/+20
| | | | | Some of the hyphenation fixes affected line breaks in the layout tests.
* Add another layout testMatthias Clasen2019-07-162-0/+51
| | | | | | | This tests a situation in which we had a crash until recently: Multiple paragraphs, with no-break attributes. We used to free the no-break attribute list prematurely.
* Add a layout test with soft hyphensMatthias Clasen2019-07-142-0/+42
|
* Some test updatesMatthias Clasen2019-07-143-22/+22
| | | | | Share the attribute printing code between all the tests, update expected output to match.
* Add a layout test with EmojiMatthias Clasen2019-06-032-0/+27
|
* Regenerate expected layout test outputMatthias Clasen2019-06-032-8/+8
| | | | | | The locale is reflected in the lang field, so the output changes due to the previous commit.
* Update expected test resultsMatthias Clasen2014-09-192-8/+8
| | | | | Update the expected output of the layout tests to the previous change.
* layout tests: Adapt expected outputMatthias Clasen2014-09-031-1/+1
| | | | | We see the 'ellipsized' analysis flag in the output now, as we should.
* Add tests for PangoLayoutMatthias Clasen2014-08-304-0/+73
This tests works similar to the markup parser tests - we populate a layout with known data, and then compare a dump of its properties with expected output.