14 lines
297 B
Go
14 lines
297 B
Go
package jsh
|
|
|
|
import "testing"
|
|
|
|
func TestToJson(t *testing.T) {
|
|
fixture := JshOutput{[]string{}, []string{}}
|
|
json := fixture.ToJson()
|
|
expected := "{\"StdOut\":[],\"StdErr\":[]}"
|
|
actual := *json
|
|
if actual != expected {
|
|
t.Error("Empty fixture did not match:\n%s != %s", expected, actual)
|
|
}
|
|
}
|