summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Update tests for small changes in outputMatthias Clasen2021-12-0229-1225/+1204
|
* testserialize: Fix the testsMatthias Clasen2021-12-021-13/+23
|
* layout: Small optimizationMatthias Clasen2021-12-022-14/+14
| | | | | Don't calculate line width the hard way when we can do it much easier.
* Add a test with tab alignmentstab-alignMatthias Clasen2021-11-292-0/+1837
|
* tabs: Tweak string formatMatthias Clasen2021-11-291-6/+6
| | | | Use newlines to separate tabs, rather than spaces.
* tabs: Add a decimal pointMatthias Clasen2021-11-293-13/+28
| | | | | | | This is useful for PANGO_TAB_DECIMAL. Implement this in PangoLayout, in the serializer, and update tests.
* serializer: Support tab alignmentsMatthias Clasen2021-11-293-13/+54
| | | | | | | | | Serialize tab alignment in addition to tab position. We still accept the old format and default alignment to left. Update testserialize and layout tests for this.
* test-layout: Make --fonts work as expectedMatthias Clasen2021-11-291-2/+5
| | | | We want to use this without initializing tests.
* tests: Fix installed data for test-layoutMatthias Clasen2021-11-281-28/+29
|
* Never show variation selectorsMatthias Clasen2021-11-281-0/+170
| | | | | | | | Even when we show ignorables, we still want to ignore variation selectors and other ignorables that we don't have nicks for. Test included.
* Fix line heights in improper gravitiesgravity-fixesMatthias Clasen2021-11-271-4/+4
| | | | | | | | | | | Without this, we end up with line height being zero in gravity north or west. The visible symptom is that wrapped lines are drawn on top of each other with line-height != 0. Affected tests have been updated. Fixes: #631
* Add a test for pango_font_serializefont-serialize-testMatthias Clasen2021-11-272-1/+79
| | | | | Now that we have fonts in git, we can reliably test this.
* font: Avoid cosmetic uglinessMatthias Clasen2021-11-271-2/+29
| | | | | | | | When setting variations to "", font descriptions would add an ugly useless " @" at the end of their serialization. Avoid that. Test included.
* Update tests one more timeMatthias Clasen2021-11-2622-1375/+1230
|
* tests: Fix font setup for EmojiMatthias Clasen2021-11-262-6/+70
| | | | We need to copy the scale hack for bitmaps.
* Add more Emoji to the included emoji fontMatthias Clasen2021-11-261-0/+0
|
* Add more fonts for test-layout testsMatthias Clasen2021-11-262-4/+7
|
* Merge branch 'hinted-metrics-fixes' into 'main'Matthias Clasen2021-11-261-14/+24
|\ | | | | | | | | | | | | Hinted metrics fixes Closes #626 See merge request GNOME/pango!518
| * Test more font sizes in the empty line height testSebastian Keller2021-11-221-14/+24
| | | | | | | | | | | | This would have caught the issue fixed in the previous commit, because the default font choice of "serif 12" happened to not be affected by it. Most other fonts or font sizes however were.
* | Skip test-layout on macOSserialization-improvementsMatthias Clasen2021-11-251-1/+6
| | | | | | | | It should work there, but it doesn't.
* | test-layout: Fix up comparison directionMatthias Clasen2021-11-251-1/+1
| | | | | | | | This makes more sense.
* | test-layout: Use an fc fontmapMatthias Clasen2021-11-251-1/+13
| | | | | | | | | | | | | | Our new, more precise font checks rely on data from fontconfig to identify fonts uniquely. So make sure that we use a custom fc fontmap, if we have one.
* | Add a newline to serialization resultsMatthias Clasen2021-11-2528-215/+96
| | | | | | | | | | | | | | | | Otherwise editing the output in an editor is likely to make the data not match anymore, since most editors will add a final newline. Update all tests
* | Make test-layout use included fontsMatthias Clasen2021-11-2533-205/+1685
| | | | | | | | | | | | | | | | | | Add Cantarell, DejaVu Sans and a subset of Noto Color Emoji to git, and make test-layout use just those fonts. This should help with keeping the ci from breaking due to different system fonts. Update tests.
* | test-layout: Drop the --show-font optionMatthias Clasen2021-11-241-6/+0
| | | | | | | | Not used anymore.
* | Add more testsMatthias Clasen2021-11-246-9/+1049
| | | | | | | | | | These were produced with the help of http://gitlab.gnome.org/matthiasc/layout-editor
* | Update test-layoutMatthias Clasen2021-11-2426-349/+13864
| | | | | | | | | | | | Use the new output serialization in test-layout to store both the input and output in the same file.
* | Optionally serialize outputMatthias Clasen2021-11-2421-916/+0
| | | | | | | | | | | | | | If requested, serialize lines, runs, and log attrs. This will let us use the serialization format to record not just the test inputs, but outputs as well.
* | More context serialization workMatthias Clasen2021-11-241-2/+2
| |
* | Allow serializing context informationMatthias Clasen2021-11-241-0/+45
| | | | | | | | | | | | | | | | | | Optionally include context information in the serialization and restore it. This will be useful for transporting for giving tests complete data that affects their output. Some tests included.
* | Add flags to serialize and deserializeMatthias Clasen2021-11-242-6/+6
| | | | | | | | | | | | | | This gives us some room to add more things to these apis, e.g. a way to store not just the input part of a layout, but also the output.
* | Rename the serialize errorsMatthias Clasen2021-11-241-5/+5
| | | | | | | | | | They are produced by deserialization, so call them that.
* | break: Fix hyphen conditionMatthias Clasen2021-11-229-25/+25
| | | | | | | | | | | | | | When looking at scripts, we want to look at the script of the *previous* character. And then we need to exclude SHY from the common script.
* | Fix a case of unintended hyphenationMatthias Clasen2021-11-222-0/+53
|/ | | | | | | | | | | | | When we take a complete item because there are no breakpoints, we were inserting a hyphen at the end even though there may not be a breakpoint there, and ending up with a hyphen in the middle of an (overlong) line: Brat-wurst. Test included. This but was discovered with the help of http://gitlab.gnome.org/matthiasc/layout-editor
* Don't replace | with hyphensMatthias Clasen2021-11-192-2/+2
| | | | | | | | | | | I went a bit overboard in #603. The vertical bar is too common, and this usage to specialized to do it by default. To enable this, we should rather make log attrs tweakable. We still replace hyphenation points with hyphens. Fixes: #630
* Make test-layout use layout serializationMatthias Clasen2021-11-1846-372/+416
| | | | | Now that we have this api, lets use it for our tests.
* Add layout serialization apiMatthias Clasen2021-11-181-0/+166
| | | | | | | | Add api to serialize PangoLayout, for the benefit of testing and debugging. Currently, this uses json, but that is an implementation detail. Some tests included.
* Add pango_tab_array_to/from_stringserialize-attrs-and-tabsMatthias Clasen2021-11-171-0/+48
|
* Use serialization api in testattributesMatthias Clasen2021-11-173-552/+337
|
* tests: Reuse attribute serialization codeMatthias Clasen2021-11-1740-353/+309
| | | | Update affected test outputs.
* Add pango_attr_list_to/from_stringMatthias Clasen2021-11-172-0/+87
| | | | | | Add an api to serialize PangoAttrList. This will be useful in testing and debugging.
* ci: Don't run testrandom on macOsMatthias Clasen2021-11-161-1/+6
| | | | | It fails there (although it shouldn't), and I don't have the means to debug it.
* CosmeticsMatthias Clasen2021-11-161-1/+1
|
* Another small leak fixMatthias Clasen2021-11-161-0/+1
|
* Fix a small memleakMatthias Clasen2021-11-161-1/+3
| | | | | Our asan ci is unforgiving, and point out every memory leak.
* tests: Add spiced up wrapping testsBenjamin Otte2021-11-152-1/+320
| | | | | | | | | | | | | | | | | | * Generate random string that looks like a sentence. * Measure the size at 100 random widths. * assert that for those widths, when sorted, the measured widths are increasing and the heights are decreasing. * Generate random string that looks like a sentence. * Generate a 2nd string adding hyphen + newline after every char of original string. * Assert that wrap-char wrap with width=0 is not larger than the width of the 2nd string The tests also generate random strings in LTR, RTL or both at the same time to spice the test up even more. It does that by picking random words out of hunspell directories, and if none are installed, it falls back to lorem ipsum.
* Update affected testsline-breaking-fixes3Matthias Clasen2021-11-151-6/+6
| | | | Some of the layout tests now get better line breaks.
* Skip the test on macOSfix-itemize-crashMatthias Clasen2021-11-131-0/+6
|
* Fix a bug in Small Caps handlingMatthias Clasen2021-11-131-0/+24
| | | | | | | | | We were not passing the correct split_offset to pango_item_split(). Testcase included. Fixes: #627
* Update affected testsfix-hyphen-widthMatthias Clasen2021-11-102-8/+8
|