tests improved
This commit is contained in:
@@ -21,14 +21,13 @@ func TestFuncFmt(t *testing.T) {
|
||||
|
||||
//t.Setenv("EXPR_PATH", ".")
|
||||
|
||||
// parserTestSpec(t, section, inputs, 19)
|
||||
// runTestSuiteSpec(t, section, inputs, 19)
|
||||
runTestSuite(t, section, inputs)
|
||||
}
|
||||
|
||||
|
||||
func TestFmt(t *testing.T) {
|
||||
section := "Builtin-Fmt"
|
||||
|
||||
|
||||
text := "ciao mondo"
|
||||
inputs := []inputType{
|
||||
/* 1 */ {fmt.Sprintf(`println("%s")`, text), int64(11), nil},
|
||||
@@ -43,7 +42,7 @@ func TestFmt(t *testing.T) {
|
||||
runCtxTestSuite(t, ctx, section, inputs)
|
||||
|
||||
SetCtrl(ctx, ControlStdout, currentStdout)
|
||||
if b.String() != text + "\n" {
|
||||
if b.String() != text+"\n" {
|
||||
t.Errorf("println(): Got: %q, Want: %q", b.String(), text+"\n")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user