summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Jung <kurt.w.jung@code.google.com>2013-08-05 10:42:40 -0400
committerKurt Jung <kurt.w.jung@code.google.com>2013-08-05 10:42:40 -0400
commitb3e554e5eaf9454cc02a9f09dc3aab9e132eb0ca (patch)
tree213b6cda11a8e122d2bb8fefa7325c6872791144
parent956ee038eebb2221e1902b9188df4423ea3ada62 (diff)
Make sure makefont utility has been built before running test
-rw-r--r--makefont/makefont_test.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/makefont/makefont_test.go b/makefont/makefont_test.go
index 8193a5c..df63aa8 100644
--- a/makefont/makefont_test.go
+++ b/makefont/makefont_test.go
@@ -7,8 +7,15 @@ import (
)
func TestMakefont(t *testing.T) {
+ var out []byte
+ var err error
const expect = "Font definition file successfully generated"
- out, err := exec.Command("./makefont", "--dst=../font", "--embed",
+ // Make sure makefont utility has been built before generating font definition file
+ err = exec.Command("go", "build").Run()
+ if err != nil {
+ t.Fatal(err)
+ }
+ out, err = exec.Command("./makefont", "--dst=../font", "--embed",
"--enc=../font/cp1252.map", "../font/calligra.ttf").CombinedOutput()
if err != nil {
t.Fatal(err)