From caed6a338466079a637af39db2836b5f4b1771a9 Mon Sep 17 00:00:00 2001 From: Kurt Jung Date: Fri, 2 Aug 2013 14:59:27 -0400 Subject: Initial commit into mercurial --- makefont/makefont_test.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 makefont/makefont_test.go (limited to 'makefont/makefont_test.go') 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") + } +} -- cgit v1.2.1-24-ge1ad