Metadata.String quotes UUID

This commit is contained in:
Sasha Koshka 2024-02-23 00:24:09 -05:00
parent bd4ed45a45
commit 1fd34731ff
2 changed files with 14 additions and 2 deletions

View File

@ -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)
}

View File

@ -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'