summaryrefslogtreecommitdiff
path: root/tests
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.
* Merge branch 'baseline-shift' into 'main'Matthias Clasen2021-09-013-179/+21
|\ | | | | | | | | Implement baseline shifts See merge request GNOME/pango!462
| * test-layout: Add a --show-fonts optionbaseline-shiftMatthias Clasen2021-08-311-0/+15
| | | | | | | | A bit more natural than the environment variable.
| * test-layout: Disable fragile checksMatthias Clasen2021-08-311-175/+0
| | | | | | | | | | | | | | I added these for improved coverage, but they get in the way, Should probably just move these kind of checks to another place and leave this test focused on dumps.
| * markup: Change <sup> and <sub>Matthias Clasen2021-08-311-4/+4
| | | | | | | | | | | | | | | | Use the new baseline-shift and font-scale attributes to reimplement <sup> and <sub>. Now they take font metrics into account and nest properly.
| * Implement font-dependent scalingMatthias Clasen2021-08-311-0/+1
| | | | | | | | | | | | | | Add a new font-scale attribute to indicate font size changes due to super- and subscript shifts, and handle it during item post-processing to find the right font sizes.
| * Implement baseline shiftsMatthias Clasen2021-08-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | Add a new baseline-shift attribute, which is similar to rise, but accumulates. In addition, it supports font- relative values such as superscript and subscript. We implement support for this by computing baseline shifts for run during line post-processing, and storing them in the runs. The renderer now takes these shifts into account when rendering layout lines.
* | test-shape: Show color glyph informationcolor-glyphMatthias Clasen2021-09-011-2/+11
|/
* tests: Test font roundtrips on MacOscoretext-font-describeMatthias Clasen2021-08-311-12/+5
| | | | | | We were skipping the test that would have found the brokenness in the previous fix. Lets see if we can get the test working on MacOs.
* test-break: Fix legend formattingMatthias Clasen2021-08-301-1/+1
|
* test-break: Add a --hex-chars optionMatthias Clasen2021-08-301-27/+44
|
* test-shape: Print out glyph classesMatthias Clasen2021-08-291-2/+31
| | | | | | These are not very reliable for things other than marks, but even that is useful for debugging cluster handling.
* test-itemize: Keep in sync with PangoLayoutMatthias Clasen2021-08-292-10/+11
| | | | | | This really needs some more generic treatment. Update affected test outputs.
* tests: Use introspection for attributesMatthias Clasen2021-08-291-64/+37
| | | | | | Now that we have introspection helpers for attributes, we can use them ourselves to make this code less brittle.
* test-itemize: Print more informationMatthias Clasen2021-08-283-1/+19
| | | | | | | Print out the items num_chars and char_offset, so we can check that the char_offset implementation works. Update affected test outputs.
* test-itemize: Improve generationMatthias Clasen2021-08-281-3/+3
| | | | | | | | | It is very annoying that gtest will dump its random seed into the output as soon as one calls g_test_init(). This pollutes our generated output. Work around that by deferring the g_test_init() call until after we've dealt with generating output.
* tests: Only print known analysis flagsMatthias Clasen2021-08-281-1/+5
| | | | We're going to steal one bit for private purposes.
* test-shape: Show cluster boundaries correctlyMatthias Clasen2021-08-271-11/+12
| | | | | | Cluster boundaries were cutting off the first character of a new cluster. Not great if the tools print out misleading information.
* test-shape: Add an option for hex charsMatthias Clasen2021-08-271-1/+20
| | | | | This is useful when trying to understand the output for scripts I don't read.
* More break testsmore-log-attr-thingsMatthias Clasen2021-08-266-0/+25
|
* Add code to validate log attrsMatthias Clasen2021-08-264-1/+587
| | | | | | This is just used in tests for now. If we decide to make an external log attr api, we can make this public.
* break: Fix up word fixupsMatthias Clasen2021-08-261-7/+7
| | | | | | | We were not correctly handling overlapping segments in all cases, with <span segment='word'>. Improve this. Update affected tests.
* break: Follow mandatory rules more strictlyMatthias Clasen2021-08-2613-91/+91
| | | | | | | | We were not putting a line break at the end of the text, in cases where a paragraph ends with a newline. Enforce this in all break apis. Update affected tests.
* tests: Improve test-shapeMatthias Clasen2021-08-251-5/+20
| | | | This helps with understanding clusters.
* tests: Make test-shape work like the othersMatthias Clasen2021-08-251-6/+1
| | | | | | There was some extra code here that was getting in the way of using all the dumper tests on the same input files. Get rid of it.
* Add segmentation attributesbreak-tailoringMatthias Clasen2021-08-2510-3/+50
| | | | | | | Add attributes that let us override word and sentence boundaries (and, indirectly, line breaks). Tests included.
* 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.