Added CI tests
Signed-off-by: Parag Nemade <pnemade@fedoraproject.org>
This commit is contained in:
parent
49ebe60582
commit
986be4acb0
7
tests/scripts/generate.pe
Executable file
7
tests/scripts/generate.pe
Executable 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)
|
||||
|
31
tests/scripts/get-font-metadata.py
Normal file
31
tests/scripts/get-font-metadata.py
Normal 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)
|
||||
|
4
tests/scripts/run_tests.sh
Normal file
4
tests/scripts/run_tests.sh
Normal 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
9
tests/tests.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-basic
|
||||
tags:
|
||||
- classic
|
||||
tests:
|
||||
- simple:
|
||||
dir: scripts/
|
||||
run: run_tests.sh
|
Loading…
Reference in New Issue
Block a user