summaryrefslogtreecommitdiff
path: root/makefont/makefont_test.go
blob: 8193a5ca00efd84b945d1b347e564b240b139a57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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")
	}
}