From b1f9024d2ae7217817ae6aa82727d38c9ad9ba68 Mon Sep 17 00:00:00 2001 From: Mihail Vratchanski Date: Fri, 6 Jun 2025 21:53:55 +0300 Subject: [PATCH] Run operators tests with yaml and Goccy implementations --- pkg/yqlib/operators_test.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkg/yqlib/operators_test.go b/pkg/yqlib/operators_test.go index eef6da26..8a9030b0 100644 --- a/pkg/yqlib/operators_test.go +++ b/pkg/yqlib/operators_test.go @@ -53,8 +53,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 {