From 9507f46c032f5751dd53b7045441c7ce743ec5ba Mon Sep 17 00:00:00 2001 From: Jay Gabriels Date: Mon, 5 Aug 2019 09:00:51 -0700 Subject: [PATCH] add version command test --- ghorg_test.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 ghorg_test.go diff --git a/ghorg_test.go b/ghorg_test.go new file mode 100644 index 0000000..9f9348d --- /dev/null +++ b/ghorg_test.go @@ -0,0 +1,17 @@ +package main + +import ( + "log" + "os" + "os/exec" + "testing" +) + +func TestMain(m *testing.M) { + err := exec.Command("go", "run", "main.go", "version").Run() + if err != nil { + log.Fatal(err) + } + + os.Exit(m.Run()) +}