From b3d37bf9212b540c43ab283fc48af423215b1c90 Mon Sep 17 00:00:00 2001 From: Briheet Singh Yadav Date: Tue, 6 Aug 2024 17:07:46 +0530 Subject: [PATCH] updated the toml_test.go Signed-off-by: Briheet Singh Yadav --- pkg/package/toml_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/package/toml_test.go b/pkg/package/toml_test.go index ec362101..54cf225a 100644 --- a/pkg/package/toml_test.go +++ b/pkg/package/toml_test.go @@ -335,6 +335,13 @@ func TestInitEmptyPkg(t *testing.T) { expected_toml = strings.ReplaceAll(expected_toml, "\r\n", "\n") got_data = strings.ReplaceAll(got_data, "\r\n", "\n") + expected_toml = strings.TrimSpace(expected_toml) + got_data = strings.TrimSpace(got_data) + + // Ensure there's no extra newlines between sections + expected_toml = strings.Join(strings.Fields(expected_toml), "\n") + got_data = strings.Join(strings.Fields(got_data), "\n") + fmt.Printf("expected_toml: '%q'\n", expected_toml) fmt.Printf("modfile: '%q'\n", got_data)