diff options
author | Daniel Baumann <daniel@debian.org> | 2024-11-21 15:00:40 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2024-11-21 15:00:40 +0100 |
commit | 012d9cb5faed22cb9b4151569d30cc08563b02d1 (patch) | |
tree | fd901b9c231aeb8afa713851f23369fa4a1af2b3 /tests/fontparts | |
parent | Initial commit. (diff) | |
download | pysilfont-012d9cb5faed22cb9b4151569d30cc08563b02d1.tar.xz pysilfont-012d9cb5faed22cb9b4151569d30cc08563b02d1.zip |
Adding upstream version 1.8.0.upstream/1.8.0upstream
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to 'tests/fontparts')
-rw-r--r-- | tests/fontparts/test_10_psfbuildcompgc.py | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/fontparts/test_10_psfbuildcompgc.py b/tests/fontparts/test_10_psfbuildcompgc.py new file mode 100644 index 0000000..34903f4 --- /dev/null +++ b/tests/fontparts/test_10_psfbuildcompgc.py @@ -0,0 +1,37 @@ +#!/usr/bin/env python +''' Test of script named in testname below +''' +__url__ = 'https://github.com/silnrsi/pysilfont' +__copyright__ = 'Copyright (c) 2018 SIL International (https://www.sil.org)' +__license__ = 'Released under the MIT License (https://opensource.org/licenses/MIT)' +__author__ = 'David Raymond' + +import silfont.util + +# Next 7 lines of code may be test-specific +import silfont.scripts.psfbuildcompgc as testcommand +testname = "psfbuildcompgc" +cl = "psfbuildcompgc tests/input/font-psf-test/source/PsfTest-Regular.ufo -i tests/input/psfbuildcomp.txt -l local/testresults/fontparts/psfbuildcompgc.log" +outfont = "local/testresults/fontparts/psfbuildcompgc.ufo" # Set to None for commands which don't output a font +diffexts = [".ufo", ".log"] # List of extensions of all output files +exp_errors = 0 # These may need updating if the test ufo is updated +exp_warnings = 0 # The test ufo should have some errors/warnings to test the code! + +# Code after this can be the same for most/all tests; if needed to be different for a test remove this comment! + +def test_run(): + result = silfont.util.test_run("FP", cl, testcommand, outfont, exp_errors, exp_warnings) + assert result + +def test_diffs(): # Do a diff on all output files + result = silfont.util.test_diffs("fontparts", testname, diffexts) + assert result + +if __name__ == "__main__": + test_run() + test_diffs() + + + + + |