1725 Commits

Author SHA1 Message Date
Miguel Sousa
0cc4ea85c6 [varLib.interpolate_layout] Tests for GPOS LookupType 2 class pairs 2017-03-13 06:51:54 -07:00
Cosimo Lupo
e6f39f855c
[tables_test] minor: fix docstrings 2017-03-13 11:28:39 +00:00
Cosimo Lupo
35b9efe648
[varLib.builder_test] added unit tests for buildVarData
b2825ff6b3 (commitcomment-21256990)

Note that the "Tests/varLib/__init__.py" file is necessary so that pytest can distinguish between same-named test modules (e.g. we have another "builder_test.py" file in Tests/feaLib).
2017-03-10 16:01:07 +00:00
Sascha Brawer
989270afc5 [AAT] Use ☃ instead of 🌍 to test non-ASCII characters
On some Python builds, Unicode characters above U+FFFF get escaped
to two question marks ?? instead of just one ?. This is not a real
problem, but for testing it is a nuisance when the results depend
on the platform.
2017-03-10 20:20:22 +08:00
Sascha Brawer
ea1adf42a7 [AAT] Add Char64 converter for 64-byte ASCII character strings
Used by Apple Advanced Typography tables, for example `gcid`.
https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6gcid.html

https://github.com/fonttools/fonttools/issues/178
2017-03-10 20:20:22 +08:00
Sascha Brawer
d7a298f36d [otConverters] Add unit test for otConverters.UInt8
This class had been added in the `morx` branch, and I wanted
to merge it into master. While writing tests for it, I noticed
that `otConverters` has meanwhile been extended by an `UInt8`
converter. Therefore, only adding a test for the existing
implementation.
2017-03-09 20:52:26 +01:00
Sascha Brawer
910edb47df [otConverters] Add unit test for otConverters.Long
I've got some changes in the `morx` branch which I'd like to merge
into master.  So I'm writing this unit test as an example how to
test `otConverter` code.
2017-03-09 20:41:34 +01:00
Sascha Brawer
189c722626 [feaLib] Clean up syntax tree for FeatureNames
The syntax tree representation now reflects the syntax of feature files.
Before this change, FeatureNames did not have their own `ast.Block`,
which had made the code quite messy.
2017-03-10 02:48:32 +08:00
Sascha Brawer
4210c9d2d6 [feaLib] Clean up lexer test for handling comments
https://github.com/fonttools/fonttools/issues/829
2017-03-09 15:20:21 +01:00
Sascha Brawer
bc0670f53f [feaLib] Simplify parser API by removing the ignore_comments option
https://github.com/fonttools/fonttools/pull/879#discussion_r104947968
https://github.com/fonttools/fonttools/issues/829
2017-03-09 22:17:58 +08:00
Sascha Brawer
ac2762f0f3 [feaLib] Add more tests for parsing comments
https://github.com/fonttools/fonttools/issues/829
2017-03-09 14:13:46 +01:00
Sascha Brawer
04b1e8ada6 [feaLib] Recognize empty statements in all table blocks
Before this change, some table statements would allow empty statements
(just a semicolon) while others would not allow them. After this change,
we're more consistent.
2017-03-09 13:58:17 +01:00
Miguel Sousa
3caeb3dab0 [varLib.interpolate_layout] Tests for GPOS ‘size’ feature and LookupType 3, 4, 5, 6 and 8 2017-03-09 03:16:27 -08:00
Cosimo Lupo
857862b94f Merge pull request #879 from silnrsi/parsecomments
Add support for comments to parser
2017-03-08 20:55:16 +00:00
Martin Hosken
5906b5358a Final changes to follow vagueries 2017-03-08 16:54:11 +00:00
Martin Hosken
c870cde47e Refactor to remove option in Lexer. Lexer always returns comments now 2017-03-08 16:29:55 +00:00
Martin Hosken
45a4a1f249 Add tests, rename _OMITs 2017-03-08 15:19:09 +00:00
Martin Hosken
450d2b939e Add support for comments to parser 2017-03-08 13:50:06 +00:00
Miguel Sousa
a3351b9cc4 [varLib.interpolate_layout] Tests for GPOS LookupType 1 and LookupType 2 specific pairs 2017-03-08 01:44:48 -08:00
Cosimo Lupo
dbaa7091c0
[interpolatable_test] skip unless scipy or munkres are installed 2017-03-07 11:35:22 +00:00
Miguel Sousa
8212916aa4 [varLib tests] Test for interpolatable.py 2017-03-06 03:04:45 -08:00
Miguel Sousa
77144253b6 [varLib tests] Add composite glyph ‘atilde’ to TestFamily2 2017-03-06 01:21:03 -08:00
Miguel Sousa
bbecfe38c4 [varLib tests] More tests 2017-03-06 00:59:21 -08:00
Cosimo Lupo
35338369cf Merge pull request #874 from miguelsousa/reorg-tests
Reorganize test data
2017-03-05 23:16:01 +00:00
Cosimo Lupo
0fc9313e79
[C_F_F__2_test] fix path to test data files 2017-03-05 22:53:05 +00:00
ReadRoberts
f208bf3421
1) Fold back in the changes introduced by Just van Possum in patch 744
2) Moved the C_F_F__2_test.py files and script under Tests/, paralleling what was done the C_F_F test  files.
2017-03-05 22:53:05 +00:00
Miguel Sousa
274654d440 [varLib tests] Move test results to separate folder 2017-03-05 13:44:32 -08:00
Miguel Sousa
bfccdbb5d5 [varLib tests] Rename test files 2017-03-05 12:05:16 -08:00
Miguel Sousa
af3df891b2 [varLib.mutator] Drop all variable tables 2017-03-04 23:30:37 -08:00
Miguel Sousa
7f792cbaf8 [varLib.mutator] Add HVAR table to test result 2017-03-04 13:02:52 -08:00
Miguel Sousa
de6b436c14 [varLib mutator] Fix test result 2017-03-04 12:55:23 -08:00
Miguel Sousa
e01c52244d [varLib.mutator] Test case and test result 2017-03-03 14:54:40 -08:00
Behdad Esfahbod
9d5e38c439 Merge pull request #869 from anthrotype/varLib-builder-fixes
[varLib.builder] Fix roundtripping XML
2017-03-03 11:31:38 -08:00
Cosimo Lupo
41035a4524
[interpolate_layout_test] add comment to clarify what the test is doing 2017-03-03 10:40:18 +00:00
Cosimo Lupo
f8349bab83 Merge pull request #871 from miguelsousa/more-varlib-tests
varLib.interpolate_layout test
2017-03-03 10:32:21 +00:00
Cosimo Lupo
8b3255111c Merge pull request #867 from miguelsousa/hhea-fix
[tests] Change `hhea` and `vhea` table version from float to hex to mute fontTools warnings
2017-03-03 08:19:01 +00:00
Miguel Sousa
4eda174a2d [varLib tests] ttx test sources, test case and test result 2017-03-02 23:09:13 -08:00
Miguel Sousa
ed46877a14 [varLib tests] another designspace and ufo test sources
This is a simpler designspace intended for testing the support of GSUB and GPOS merging.
2017-03-02 23:05:34 -08:00
Cosimo Lupo
9fbefd1d71
[test_tables] minor whitespace 2017-03-02 13:40:41 +00:00
Cosimo Lupo
9c6aaf0bf6
[test_tables] skip cmap tests when unicodedata2 is not installed
When the tests are run with `python setup.py test` (e.g. from the ./run-tests.sh
script), we can't have setuptools install pre-compiled wheels for extra test
requirements (e.g. Brotli, unicodedata2).
Instead of failing, it's better that we skip the tests that have such extra
requirements.

NOTE: The recommended way to run the full test suite is by using tox
(like we do on the CI), or by installing pytest and the rests of requirements.txt,
and then run `pytest` command directly.
2017-03-02 13:34:39 +00:00
Cosimo Lupo
0a9ab169fe
[test_tables] remove unused import 2017-03-02 13:30:12 +00:00
Cosimo Lupo
43bf2c4cb4
[aots/cmap4_font4.ttx.cmap] 0x37f is "GREEK CAPITAL LETTER YOT" 2017-03-02 13:29:06 +00:00
Cosimo Lupo
937bf40c11
[tables_test] dynamically parametrize tests using 'pytest_generate_tests'
pytest provides built-in support for implementing your custom dynamic
parametrization schemes:

http://doc.pytest.org/en/latest/parametrize.html#pytest-generate-tests
2017-03-02 10:57:26 +00:00
Cosimo Lupo
fca44b495c
[aots/data] rename OS2 -> OS_2 like in xml table tags; add sfntVersion where missing 2017-03-02 10:57:26 +00:00
Behdad Esfahbod
f652c405e3
[WIP] Add test fonts from AOTS and start of a driver, copied from mtiLib 2017-03-02 10:57:25 +00:00
Cosimo Lupo
57ed70d7b0
[varLib_test] compile binary varfont and check TTX dump doesn't change 2017-03-01 17:55:20 +00:00
Cosimo Lupo
0624d53a5b
[Tests] update varLib/data/BuildTest.ttx
The output of saveXML() immediately after running varLib.builder is now
the same as compiling/decompiling/dumping the font with ttx

https://github.com/fonttools/fonttools/pull/866#issuecomment-283397789
2017-03-01 17:31:31 +00:00
Miguel Sousa
6ccd7c83f0 File rename for consistency (https://github.com/fonttools/fonttools/pull/866#issuecomment-283345103) 2017-03-01 06:28:57 -08:00
Miguel Sousa
306882a00a [tests] Change hhea and vhea table version from float to hex to mute fontTools warnings 2017-02-28 16:35:13 -08:00
Miguel Sousa
d1f717ca16 [varLib.build] Test case and test result 2017-02-28 12:15:51 -08:00