diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-11-29 00:09:50 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-11-29 08:12:11 -0500 |
commit | ae8297b785eacc61890b6042c0f89af6f65b3bb3 (patch) | |
tree | 2ea240fdb43f818145781910cb1116e4a1a03d17 /tests | |
parent | a6ed4ff80188bb0472891b08c421d3ca4c846315 (diff) | |
download | pango-ae8297b785eacc61890b6042c0f89af6f65b3bb3.tar.gz |
tabs: Add a decimal point
This is useful for PANGO_TAB_DECIMAL.
Implement this in PangoLayout, in the
serializer, and update tests.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/layouts/valid-12.layout | 15 | ||||
-rw-r--r-- | tests/layouts/valid-13.layout | 15 | ||||
-rw-r--r-- | tests/testserialize.c | 11 |
3 files changed, 28 insertions, 13 deletions
diff --git a/tests/layouts/valid-12.layout b/tests/layouts/valid-12.layout index bbe9a576..247b374e 100644 --- a/tests/layouts/valid-12.layout +++ b/tests/layouts/valid-12.layout @@ -23,23 +23,28 @@ "positions" : [ { "position" : 0, - "alignment" : "left" + "alignment" : "left", + "decimal-point" : 0 }, { "position" : 50, - "alignment" : "left" + "alignment" : "left", + "decimal-point" : 0 }, { "position" : 100, - "alignment" : "left" + "alignment" : "left", + "decimal-point" : 0 }, { "position" : 150, - "alignment" : "left" + "alignment" : "left", + "decimal-point" : 0 }, { "position" : 200, - "alignment" : "left" + "alignment" : "left", + "decimal-point" : 0 } ] }, diff --git a/tests/layouts/valid-13.layout b/tests/layouts/valid-13.layout index bc20a3c1..b557a278 100644 --- a/tests/layouts/valid-13.layout +++ b/tests/layouts/valid-13.layout @@ -23,23 +23,28 @@ "positions" : [ { "position" : 0, - "alignment" : "left" + "alignment" : "left", + "decimal-point" : 0 }, { "position" : 50, - "alignment" : "left" + "alignment" : "left", + "decimal-point" : 0 }, { "position" : 100, - "alignment" : "left" + "alignment" : "left", + "decimal-point" : 0 }, { "position" : 150, - "alignment" : "left" + "alignment" : "left", + "decimal-point" : 0 }, { "position" : 200, - "alignment" : "left" + "alignment" : "left", + "decimal-point" : 0 } ] }, diff --git a/tests/testserialize.c b/tests/testserialize.c index 325338f1..78424eff 100644 --- a/tests/testserialize.c +++ b/tests/testserialize.c @@ -87,6 +87,7 @@ test_serialize_tab_array (void) " 0 10 ", "20 10", "left:10px right:20px center:30px decimal:40px", + "decimal:10240:94", "" }; const char *roundtripped[] = { @@ -95,6 +96,7 @@ test_serialize_tab_array (void) "0 10", "20 10", "10px right:20px center:30px decimal:40px", + "decimal:10240:94", "" }; const char *invalid[] = { @@ -235,15 +237,18 @@ test_serialize_layout_valid (void) " \"positions\" : [\n" " {\n" " \"position\" : 0,\n" - " \"alignment\" : \"left\"\n" + " \"alignment\" : \"left\",\n" + " \"decimal-point\" : 0\n" " },\n" " {\n" " \"position\" : 50,\n" - " \"alignment\" : \"center\"\n" + " \"alignment\" : \"center\",\n" + " \"decimal-point\" : 0\n" " },\n" " {\n" " \"position\" : 100,\n" - " \"alignment\" : \"right\"\n" + " \"alignment\" : \"decimal\",\n" + " \"decimal-point\" : 94\n" " }\n" " ]\n" " },\n" |