@@ -142,7 +142,7 @@ func testMain(
142142 red .Fprintf (output , "✗ %s\n " , document .RelativePath )
143143
144144 for _ , failure := range failures {
145- fmt .Fprintf (output , indent (failure , 4 ))
145+ fmt .Fprintf (output , indent (failure , 4 )+ " \n " )
146146 }
147147 } else {
148148 green := color .New (color .FgGreen )
@@ -421,21 +421,31 @@ func (s symbolAttributeTestCase) check(attr symbolAttribute) bool {
421421
422422func formatFailure (lineNumber int , testCase symbolAttributeTestCase , attributesAtLine []symbolAttribute ) string {
423423 failureDesc := []string {
424- fmt .Sprintf ("Failure - row : %d, column : %d" , lineNumber , testCase .attribute .start ),
424+ fmt .Sprintf ("Failure [Ln : %d, Col : %d] " , lineNumber + 1 , testCase .attribute .start ),
425425 fmt .Sprintf (" Expected: '%s %s'" , testCase .attribute .kind , testCase .attribute .data ),
426426 }
427427 for _ , add := range testCase .attribute .additionalData {
428428 failureDesc = append (failureDesc , indent (fmt .Sprintf ("'%s'" , add ), 12 ))
429429 }
430430
431- failureDesc = append (failureDesc , " Actual:" )
432431 if (len (attributesAtLine )) == 0 {
433- failureDesc = append (failureDesc , " - No attributes found" )
432+ failureDesc = append (failureDesc , " Actual: <no attributes found> " )
434433 } else {
435- for _ , attr := range attributesAtLine {
436- failureDesc = append (failureDesc , fmt .Sprintf (" - '%s %s'" , attr .kind , attr .data ))
434+ for i , attr := range attributesAtLine {
435+ prefix := " "
436+ if i == 0 {
437+ prefix = "Actual:"
438+ }
439+
440+ if len (attributesAtLine ) > 1 {
441+ prefix += " *"
442+ } else {
443+ prefix += " "
444+ }
445+
446+ failureDesc = append (failureDesc , fmt .Sprintf (" %s '%s %s'" , prefix , attr .kind , attr .data ))
437447 for _ , add := range attr .additionalData {
438- failureDesc = append (failureDesc , indent (fmt .Sprintf ("'%s'" , add ), 6 ))
448+ failureDesc = append (failureDesc , indent (fmt .Sprintf ("'%s'" , add ), 12 ))
439449 }
440450 }
441451 }
0 commit comments