Metadata.String quotes UUID

This commit is contained in:
Sasha Koshka 2024-02-23 00:24:09 -05:00
parent 3db6aa211e
commit 0bbeeda319
2 changed files with 14 additions and 2 deletions

View File

@ -15,7 +15,7 @@ type Metadata struct {
Dependencies []*Dependency Dependencies []*Dependency
} }
func (this *Metadata) String () string { func (this *Metadata) String () string {
out := fmt.Sprint(this.UUID) out := fmt.Sprint(Quote(this.UUID.String()))
for _, dependency := range this.Dependencies { for _, dependency := range this.Dependencies {
out += fmt.Sprint("\n", dependency) out += fmt.Sprint("\n", dependency)
} }

View File

@ -7,8 +7,20 @@ testString (test,
// correct // correct
`'5a8353f8-cad8-4604-be60-29a2575996bc' `'5a8353f8-cad8-4604-be60-29a2575996bc'
+ 'io' + 'io'
+ '../io' customIo`,
// input
`'5a8353f8cad84604be6029a2575996bc'
+ 'io'
+ '../io' customIo + '../io' customIo
`, `)
}
func TestMetadataStrange (test *testing.T) {
testString (test,
// correct
`'5a8353f8-cad8-4604-be60-29a2575996bc'
+ 'io'
+ '../io' customIo`,
// input // input
` `
'5a8353f8cad84604be6029a2575996bc' '5a8353f8cad84604be6029a2575996bc'