Added CI tests

Signed-off-by: Parag Nemade <pnemade@fedoraproject.org>
This commit is contained in:
Parag Nemade 2019-05-14 14:03:24 +05:30
parent 49ebe60582
commit 986be4acb0
No known key found for this signature in database
GPG Key ID: 71932951EB71E972
4 changed files with 51 additions and 0 deletions

7
tests/scripts/generate.pe Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/fontforge
i=1
Open($argv[i], 1)
#Use gen_flags=Defualt fmflags value as -1
gen_flags = -1
Generate("" + $fontname + ".ttf", "", gen_flags)

View File

@ -0,0 +1,31 @@
#!/usr/bin/python3
import fontforge
import sys
if len(sys.argv) > 1:
f = fontforge.open(sys.argv[1])
else:
print("provide fontfile path as an argument")
sys.exit(1)
if f.fullname:
print("Fontname is {0}".format(f.fullname))
else:
print("fontname not set")
if f.weight:
print("Given font weight is {0}".format(f.weight))
else:
print("Given font weight not set")
if f.version:
print("Given font version is {0}".format(f.version))
else:
print("Given font version not set")
if f.copyright:
print("Given font Copyright text is => {0}".format(f.copyright))
else:
print("Given font copyright information not set")
ver = fontforge.UnicodeNamesListVersion()
print("Libuninameslist version is : %s" % ver)

View File

@ -0,0 +1,4 @@
#!/bin/bash
/usr/bin/fontforge -script generate.pe /usr/share/fontforge/python/test.sfd
/usr/bin/python3 get-font-metadata.py ./Untitled1.ttf

9
tests/tests.yaml Normal file
View File

@ -0,0 +1,9 @@
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
tests:
- simple:
dir: scripts/
run: run_tests.sh