summaryrefslogtreecommitdiff
path: root/tests/test-break.c
Commit message (Collapse)AuthorAgeFilesLines
* test-break: Fix legend formattingMatthias Clasen2021-08-301-1/+1
|
* test-break: Add a --hex-chars optionMatthias Clasen2021-08-301-27/+44
|
* Add code to validate log attrsMatthias Clasen2021-08-261-0/+6
| | | | | | This is just used in tests for now. If we decide to make an external log attr api, we can make this public.
* test-break: Print out hyphensMatthias Clasen2021-08-251-5/+26
| | | | | | Print out all the log attrs we have. Update expected test outputs.
* tests: Tweak test-break outputMatthias Clasen2021-08-221-16/+17
| | | | | | Change the order in test-break output to be sentence, word, grapheme. Update all affected test outputs.
* tests: Avoid bidi in test outputMatthias Clasen2021-08-051-0/+2
| | | | | | | When rendering the text char-by-char, use directional controls to avoid any bidi reordering. Update affected tests.
* tests: Locale handling fixesMatthias Clasen2021-07-211-1/+1
| | | | | The return value of setlocale is only good until the next call. Also, consistently use en_US.UTF-8.
* tests: Dump grapheme boundaries tooMatthias Clasen2021-07-071-5/+22
| | | | | | | Add grapheme boundaries to the output of test-break, so we can check those easily, too. Update expected test output for this.
* tests: Make test-break output more convenientMatthias Clasen2021-07-061-6/+10
| | | | | Avoid g_test_init if we are just generating expected output, for easier updating.
* tests: Check more layout propertiesMatthias Clasen2021-07-061-0/+6
| | | | | | | | 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.
* tests: Improve coverageMatthias Clasen2021-07-061-0/+9
| | | | Spot-check a copied layout in test-break.
* Fix a memory leakMatthias Clasen2021-07-061-0/+2
|
* test-break: Make help output work againMatthias Clasen2021-05-101-3/+4
| | | | | | | test-break has a helpful text that explains the maining of the output. Unfortunately, the --help option is taken by g_test_init(), so make this available with --legend.
* Revert "testsuite: Don't use g_test_skip"Simon McVittie2021-01-031-6/+0
| | | | | | | | | | | When versions of Meson with bug https://github.com/mesonbuild/meson/issues/7515 are no longer widespread, the Pango test suite should diagnose which tests are skipped again. Versions 0.55.0 to 0.55.2 inclusive have the bug; version 0.55.3 is OK. This reverts commit 440f9c2609b7f5f9d8f65619b029a5eb660de88b. Signed-off-by: Simon McVittie <smcv@debian.org>
* tests: Fix some more memory errorsasan-fixesMatthias Clasen2020-09-121-5/+15
| | | | | test-break was leaking memory in various places, in particular when tests are skipped.
* tests: Fix memory leaksMatthias Clasen2020-09-121-1/+1
| | | | These were showing up as errors from lsan.
* Undo a recent changeMatthias Clasen2020-08-101-2/+2
| | | | | | Revert 97778b40daedac08f6, since it sadly broke running our testsuite which does pass arguments like -k and --tap.
* test-break: Add a legendMatthias Clasen2020-08-091-4/+19
| | | | | Use test-break --help to get a legend for the codes used in the output.
* test-break: Improve outputMatthias Clasen2020-08-091-3/+3
| | | | | | When we are generating expected output, don't init the tests, so we can avoid the random seed and # in the output.
* testsuite: Don't use g_test_skipMatthias Clasen2020-07-301-2/+12
| | | | | | | meson 0.55 considers tests using it to be FAIL. I disagree, but lets quietly skip until 0.55.1 is available.
* test-break: Some fixesMatthias Clasen2020-06-111-3/+12
| | | | | | | | Try to make test-break not fail on my system. First I made it skip tests that produce missing glyphs, then I made it call setlocale(). In the end, I needed to just install the right Thai fonts. But these fixes are still useful.
* Merge branch 'for-master' into 'master'Matthias Clasen2020-06-081-6/+25
|\ | | | | | | | | For master See merge request GNOME/pango!184
| * tests: Update the locale useEmmanuele Bassi2020-06-081-3/+4
| | | | | | | | | | Create the PangoContext for the test after resetting the locale, and use the en_US.utf8 name, as it seems to be the name used by Fedora.
| * tests: Ensure we respect the TAP output formatEmmanuele Bassi2020-06-081-3/+12
| | | | | | | | | | When dumping the diff between the computed and expected results, we need to respect the TAP format and place "#" in front of each line.
| * Skip test-break when the en_US locale is missingEmmanuele Bassi2020-06-081-3/+12
| | | | | | | | Just like test-layout and test-itemize.
* | Merge branch 'test-break-no-libthai' into 'master'Matthias Clasen2020-06-081-0/+6
|\ \ | |/ |/| | | | | tests/test-break.c: Only test Thai breaks with libthai available See merge request GNOME/pango!161
| * tests/test-break.c: Only test Thai breaks with libthai availableChun-wei Fan2019-11-251-0/+6
| | | | | | | | | | | | The four.break test data file involves the Thai language, meaning that this test will fail unless we have libthai. Skip this test unless libthai is found.
* | tests: Use the appropriate GTest APIEmmanuele Bassi2020-04-141-14/+7
|/ | | | | | | | Do not use homegrown assertion and failure macros, when GTest has perfectly functional API to deal with all the cases Pango covers. Using GTest also allows us to rely on appropriate formatting for results and logging.
* Remove an unused variableMatthias Clasen2019-07-221-3/+0
|
* test-break: Use pango_layout_get_log_attrsMatthias Clasen2019-07-201-3/+18
| | | | pango_get_log_attrs does not apply allow-break attributes.
* Update testsMatthias Clasen2019-07-091-5/+0
| | | | | | test-break was using the is_soft_hyphen log attr that we've just removed again. Adapt, and update expected test output.
* test-break: Print line separator in hexMatthias Clasen2019-07-071-1/+3
| | | | This alternative is not useful.
* test-break: Skip initial comment in test filesMatthias Clasen2019-07-071-4/+12
| | | | This is useful for documenting tests.
* Make the break test actually test thingsMatthias Clasen2019-07-071-1/+11
| | | | | We were not diffing the output against the expected results.
* Add a test for log attrsMatthias Clasen2019-07-071-0/+289
This is useful for exploring line breaking.