summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Add some new tests for hyphenshyphen-log-attrMatthias Clasen2021-08-254-0/+16
|
* test-break: Print out hyphensMatthias Clasen2021-08-258-35/+63
| | | | | | Print out all the log attrs we have. Update expected test outputs.
* Refine hyphenationMatthias Clasen2021-08-251-1/+1
| | | | | | | | Replace ‧ and | with a - when we break there. Update affected test output. Fixes: #603
* break-thai: Fix up word break handlingMatthias Clasen2021-08-231-6/+6
| | | | | | | | | | | We want to insert word start+end if libthai hands us line breaks between letters. But must be careful not to overwrite existing word boundaries, or we end up with a nonsense sequence. This was found by checking log attr invariants. Regenerate affected test outputs.
* Sync up test file listsfix-test-listsMatthias Clasen2021-08-221-1/+25
| | | | | | We have more tests than meson knows about. Fixes: #600
* tests: Silence compiler warningsMatthias Clasen2021-08-226-7/+12
|
* testattributes: Assert properlyMatthias Clasen2021-08-221-18/+9
|
* tests: Make test-itemize work betterMatthias Clasen2021-08-221-3/+3
| | | | | This wasn't working when passed a file on the commandline. Fix that.
* tests: Add more attribute testsMatthias Clasen2021-08-222-0/+110
| | | | | Handle all attribute types when testing copying, and add tests for the binding helpers.
* TrivialMatthias Clasen2021-08-221-1/+1
| | | | Fix a comment
* tests: Tweak test-break outputMatthias Clasen2021-08-228-23/+24
| | | | | | Change the order in test-break output to be sentence, word, grapheme. Update all affected test outputs.
* Merge branch 'matthiasc/for-master' into 'main'Matthias Clasen2021-08-214-4/+0
|\ | | | | | | | | Remove leftover test files See merge request GNOME/pango!426
| * Remove leftover test filesmatthiasc/for-masterMatthias Clasen2021-08-214-4/+0
| | | | | | | | | | These don't have a corresponding .break file, so they are useless.
* | Add a test for text_transform in markuptext-transform-3Matthias Clasen2021-08-202-0/+20
| |
* | tests: Use en_US.UTF8 instead of CMatthias Clasen2021-08-201-1/+1
| | | | | | | | | | The C locale gives us heartburn wrt to any non-ASCII chars.
* | tests: Handle text transform attrsMatthias Clasen2021-08-201-0/+1
| |
* | 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 a layout extents checkMatthias Clasen2021-08-201-0/+72
| | | | | Add a check that tests that layout, line, run, cluster and char extents are nested as expected.
* Correct an error messagefix-gravity-errorMatthias Clasen2021-08-171-1/+1
| | | | | | Update affected tests Fixes: #598
* Add a test for pango_layout_index_to_xmore-testsMatthias Clasen2021-08-101-2/+51
| | | | | Test that we can round-trip with pango_layout_x_index (most of the time).
* Remove some check from test-layoutMatthias Clasen2021-08-101-18/+4
| | | | | | | Some of these aren't reliable, and were only added for test coverage. Fixes: #576
* Add more tests for move-visuallycursor-move-fixesMatthias Clasen2021-08-091-4/+48
| | | | | These cover more of the corner cases fixed in the previous commits.
* Fix corner cases around line endsMatthias Clasen2021-08-091-0/+4
| | | | | | | | | | pango_layout_index_to_line_and_extents needs to return a run rect even if the line has no non-empty runs. Failing to do so was causing cursors at the end of lines to have a height of 0 or 1, which is not what we want. Add a testcase.
* testmisc.c: Fix builds without FontConfig/PangoFT2Chun-wei Fan2021-08-091-0/+7
| | | | | Some tests used items from PangoFT2, which may not have been enabled on platforms where that was optionally built.
* Adapt testsline-height-attributeMatthias Clasen2021-08-081-2/+10
| | | | | | Now that we are using run extents for cursor positions, the vertical extents aren't necessarily constant across a line anymore. Adapt our assertions.
* Merge branch 'bidi-revenge' into 'main'Matthias Clasen2021-08-084-12/+87
|\ | | | | | | | | | | | | Reimplement pango_layout_move_cursor_visually Closes #587, #585, and #157 See merge request GNOME/pango!389
| * Add multi-line tests for move-cursorMatthias Clasen2021-08-081-0/+63
| | | | | | | | | | Test the line end handling of pango_layout_move_cursor_visually.
| * Reimplement pango_layout_move_cursor_visuallyMatthias Clasen2021-08-083-3/+3
| | | | | | | | | | | | | | | | 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
| * Add tests for pango_layout_move_cursor_visuallyMatthias Clasen2021-08-081-9/+14
| | | | | | | | Some of these currently fail.
| * Small correction to test-layoutMatthias Clasen2021-08-061-1/+8
| | | | | | | | | | We need to apply trailing properly, by skipping characters.
* | markup: Allow specifying size as percentagemarkup-sizesMatthias Clasen2021-08-082-0/+19
| | | | | | | | | | | | | | Accept values like 200%, in addition to other ways of specifying sizes in markup. Fixes: #23
* | markup: Allow pt for rise tooMatthias Clasen2021-08-085-1/+31
| |
* | markup: Allow specifying size in ptMatthias Clasen2021-08-084-2/+15
|/ | | | | | | | Accept values like 12.5pt, in addition to the other ways of specifying font size in markup. Fixes: #67
* Add tests for pango_layout_move_cursor_visuallybidi-adventuresMatthias Clasen2021-08-052-1/+184
| | | | Some of these currently fail.
* tests: Avoid bidi in test outputMatthias Clasen2021-08-0512-31/+13
| | | | | | | When rendering the text char-by-char, use directional controls to avoid any bidi reordering. Update affected tests.
* Add a test for pango_layout_get_cursor_posfix-split-cursors-at-endMatthias Clasen2021-08-041-0/+37
| | | | | | This checks that we get split cursors in some cases where we expect it. One of the cases was broken until the previous commit.
* Add an old testcaseMatthias Clasen2021-08-041-0/+29
| | | | | | | | This was quite an odyssee: - Identify commit from 2008 that caused a regression - Spot the commit message alluding to a crash - Identify bug number in NEWS for releases from 2008 - Find the bug in the no longer searchable bugzilla.gnome.org
* Add some more bidi embedding level testsMatthias Clasen2021-08-041-0/+2
|
* itemize: Ignore width in horizontal contextignore-width-in-horizontal2Matthias Clasen2021-08-036-28/+75
| | | | | | | | | 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.
* tests: Fix implicit function declaration warnings with gccBiswapriyo Nath2021-07-291-0/+1
| | | | This includes stdlib.h for strtol, strtoll and strtod functions declaration
* Correctly handle font attributesbetter-ellipsizeMatthias Clasen2021-07-221-0/+1
| | | | | | | | | | pango_attr_iterator_get_attributes only returns the innermost attribute of each kind. That is correct for attributes that supersede each other, but not for font descriptions, which get merged. So, keep all font attributes in the returned list. Update affected tests.
* Try harder to skip tests on MacOsMatthias Clasen2021-07-212-0/+48
| | | | | | For tests where the wrong fonts break things, check that we have Cantarell, and skip them if not.
* tests: Fix an assertionMatthias Clasen2021-07-211-3/+4
| | | | | We were rounding things differently, giving us off-by-one errors on MacOs.
* tests: Locale handling fixesMatthias Clasen2021-07-216-9/+12
| | | | | The return value of setlocale is only good until the next call. Also, consistently use en_US.UTF-8.
* Quiet another compiler warningMatthias Clasen2021-07-101-1/+1
|
* Silence compiler warningsMatthias Clasen2021-07-101-1/+2
|
* tests: Add a way to show fonts in test-layoutMatthias Clasen2021-07-101-1/+5
| | | | | | | This is sometimes useful, even if we want to avoid it in ci. So add an environment variable, PANGO_TEST_SHOW_FONT to make it show the actual font instead of 'OMITTED'.
* 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-093-101/+84
| | | | | | | | | | 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.