diff options
Diffstat (limited to 'makefont/makefont_test.go')
-rw-r--r-- | makefont/makefont_test.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/makefont/makefont_test.go b/makefont/makefont_test.go new file mode 100644 index 0000000..8193a5c --- /dev/null +++ b/makefont/makefont_test.go @@ -0,0 +1,19 @@ +package main + +import ( + "os/exec" + "strings" + "testing" +) + +func TestMakefont(t *testing.T) { + const expect = "Font definition file successfully generated" + out, err := exec.Command("./makefont", "--dst=../font", "--embed", + "--enc=../font/cp1252.map", "../font/calligra.ttf").CombinedOutput() + if err != nil { + t.Fatal(err) + } + if !strings.Contains(string(out), expect) { + t.Fatalf("Unexpected output from makefont") + } +} |