summaryrefslogtreecommitdiff
path: root/tests/test-common.c
Commit message (Collapse)AuthorAgeFilesLines
* Update test-layoutMatthias Clasen2021-11-241-0/+64
| | | | | | Use the new output serialization in test-layout to store both the input and output in the same file.
* Use serialization api in testattributesMatthias Clasen2021-11-171-236/+0
|
* tests: Reuse attribute serialization codeMatthias Clasen2021-11-171-52/+8
| | | | 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.
* Add segmentation attributesbreak-tailoringMatthias Clasen2021-08-251-0/+2
| | | | | | | Add attributes that let us override word and sentence boundaries (and, indirectly, line breaks). Tests included.
* tests: Add more attribute testsMatthias Clasen2021-08-221-0/+3
| | | | | Handle all attribute types when testing copying, and add tests for the binding helpers.
* tests: Handle text transform attrsMatthias Clasen2021-08-201-0/+1
|
* tests: Fix implicit function declaration warnings with gccBiswapriyo Nath2021-07-291-0/+1
| | | | This includes stdlib.h for strtol, strtoll and strtod functions declaration
* Silence compiler warningsMatthias Clasen2021-07-101-1/+2
|
* Improve attribute test infrastructureMatthias Clasen2021-07-091-9/+46
| | | | | | | | | | 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.
* tests: In attribute_from_string, parse offsets as long longJan Alexander Steffens (heftig)2021-07-021-3/+3
| | | | | We need space for G_MAXUINT and 4294967285 (in testattributes.c). On i686, this requires long long, as long is only 32 bits wide.
* tests: Improve markup test coverageMatthias Clasen2021-06-281-0/+19
| | | | Cover many more error cases.
* Add better attribute test infrastructureMatthias Clasen2021-06-281-0/+198
| | | | | | | Add a way to deserialize a PangoAttrList from a string, for less cumbersome tests. And use it in testattributes.
* tests: Avoid locale dependencyfix-test-outputMatthias Clasen2021-01-231-5/+10
| | | | | | | When producing output, use the C locale for formatting floating point numbers, to avoid locale dependent output. Fixes: #474
* Fix a few memory leaks in testsMatthias Clasen2020-07-081-2/+10
| | | | These were pointed out by asan.
* test-common: Ignore null attr listsTimm Bäder2020-06-081-0/+3
| | | | | pango_layout_get_attributes() is explicitly nullable but not every caller handles that case.
* tests: Handle new attributesMatthias Clasen2019-10-311-0/+2
|
* Add an insert-hyphens attributeMatthias Clasen2019-08-041-0/+1
| | | | | | | | | Add a text attribute that allows to suppress insertion of hyphens at intra-word line breaks. This is useful for non-paragraph-like contexts, where line breaks are needed, but hyphens are not expected.
* tests: Print the show attributeMatthias Clasen2019-07-251-0/+1
|
* tests: Print new attributesMatthias Clasen2019-07-221-0/+1
|
* tests: Use pango_attr_list_get_attributesMatthias Clasen2019-07-191-13/+0
|
* Some test updatesMatthias Clasen2019-07-141-57/+46
| | | | | Share the attribute printing code between all the tests, update expected output to match.
* test-common: do case-insensitive diffsRoss Burton2019-03-251-2/+2
| | | | | | Typically the tests don't care about the case of the characters, but g_printf("%s", 0x0) returns "(null)" if glibc is being used and "(NULL)" if gnulib's drop-in replacement are used. Fixes #356
* test-common: extend print_attribute()Ross Burton2019-03-251-0/+9
| | | | | The copy of print_attribute() in markup-parse.c handles more attributes, so add those here too.
* tests: Don't include unistd.h unconditionallyChun-wei Fan2017-08-081-1/+7
| | | | | | | Don't include unistd.h on Windows, and include io.h if necessary, as Windows compilers may not ship with it. https://bugzilla.gnome.org/show_bug.cgi?id=783274
* [test] Include headerBehdad Esfahbod2015-05-041-0/+1
|
* Split out some test functionsMatthias Clasen2015-03-131-0/+204
These will be reused later.