From 1fd34731ff563055ed4bc22618d9450bb847e14f Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Fri, 23 Feb 2024 00:24:09 -0500 Subject: [PATCH] Metadata.String quotes UUID --- entity/meta.go | 2 +- parser/meta/parser_test.go | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/entity/meta.go b/entity/meta.go index 1fbffa5..70ec58e 100644 --- a/entity/meta.go +++ b/entity/meta.go @@ -15,7 +15,7 @@ type Metadata struct { Dependencies []*Dependency } func (this *Metadata) String () string { - out := fmt.Sprint(this.UUID) + out := fmt.Sprint(Quote(this.UUID.String())) for _, dependency := range this.Dependencies { out += fmt.Sprint("\n", dependency) } diff --git a/parser/meta/parser_test.go b/parser/meta/parser_test.go index 482a3c7..cad0fde 100644 --- a/parser/meta/parser_test.go +++ b/parser/meta/parser_test.go @@ -7,8 +7,20 @@ testString (test, // correct `'5a8353f8-cad8-4604-be60-29a2575996bc' + 'io' ++ '../io' customIo`, +// input +`'5a8353f8cad84604be6029a2575996bc' ++ 'io' + '../io' customIo -`, +`) +} + +func TestMetadataStrange (test *testing.T) { +testString (test, +// correct +`'5a8353f8-cad8-4604-be60-29a2575996bc' ++ 'io' ++ '../io' customIo`, // input ` '5a8353f8cad84604be6029a2575996bc'