Merge branch 'testfixes' into 'master'
Testfixes Fixed some testing issues. See merge request !10
This commit is contained in:
commit
dd2578d084
2
Makefile
2
Makefile
@ -4,7 +4,7 @@ GOBUILD=$(GOCMD) build
|
||||
GOCLEAN=$(GOCMD) clean
|
||||
GOINSTALL=$(GOCMD) install
|
||||
GOTEST=$(GOCMD) test
|
||||
GODEP=$(GOTEST) -i
|
||||
GODEP=$(GOTEST)
|
||||
GOFMT=gofmt -w
|
||||
GOCOVER=$(GOCMD) tool cover
|
||||
COVER_DIR=cover
|
||||
|
@ -3,7 +3,7 @@ package jsh
|
||||
import "testing"
|
||||
|
||||
func TestToJson(t *testing.T) {
|
||||
fixture := JshOutput{[]string{}, []string{}}
|
||||
fixture := JshFrame{[]string{}, []string{}}
|
||||
json := fixture.ToJson()
|
||||
expected := `{"StdOut":[],"StdErr":[]}`
|
||||
actual := *json
|
||||
@ -11,7 +11,7 @@ func TestToJson(t *testing.T) {
|
||||
t.Errorf("Empty fixture did not match:\n%s != %s", expected, actual)
|
||||
}
|
||||
|
||||
fixture = JshOutput{[]string{"potato!"}, []string{}}
|
||||
fixture = JshFrame{[]string{"potato!"}, []string{}}
|
||||
json = fixture.ToJson()
|
||||
expected = `{"StdOut":["potato!"],"StdErr":[]}`
|
||||
actual = *json
|
||||
|
@ -20,7 +20,7 @@ func TestNewFilesystem(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Errorf("Passing 5 strings should not raise an error")
|
||||
}
|
||||
expected := Filesystem{"1", "2", "3", "4", "5"}
|
||||
expected := Filesystem{"1", 2, 3, 4, "5"}
|
||||
actual := *proc
|
||||
if expected != actual {
|
||||
t.Errorf("Filesystem was incorrectly generated:\n%s != %s", expected, actual)
|
||||
|
Reference in New Issue
Block a user