Run operators tests with yaml and Goccy implementations

This commit is contained in:
Mihail Vratchanski 2025-06-06 21:53:55 +03:00
parent 866a8a7b8a
commit 4375d1e349

View File

@ -38,8 +38,17 @@ func TestMain(m *testing.M) {
Now = func() time.Time {
return time.Date(2021, time.May, 19, 1, 2, 3, 4, time.UTC)
}
code := m.Run()
os.Exit(code)
ConfiguredYamlPreferences.UseGoccyParser = false
exitCode := m.Run()
if exitCode != 0 {
os.Exit(exitCode)
}
ConfiguredYamlPreferences.UseGoccyParser = true
exitCode = m.Run()
os.Exit(exitCode)
}
func NewSimpleYamlPrinter(writer io.Writer, unwrapScalar bool, indent int, printDocSeparators bool) Printer {