Fix reporting of unexpected selections in integration tests (#3662)

Expected and actual selection were swapped in the error message.
This commit is contained in:
Stefan Haller 2024-06-14 13:36:45 +02:00 committed by GitHub
commit 629b7ba1b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -263,8 +263,8 @@ func (self *ViewDriver) assertLines(offset int, matchers ...*TextMatcher) *ViewD
return false, fmt.Sprintf(
"Unexpected selection in view '%s'. Expected %s to be selected but got %s.\nExpected selected lines:\n---\n%s\n---\n\nActual selected lines:\n---\n%s\n---\n",
view.Name(),
formatLineRange(startIdx, endIdx),
formatLineRange(expectedStartIdx, expectedEndIdx),
formatLineRange(startIdx, endIdx),
strings.Join(expectedSelectedLines, "\n"),
strings.Join(lines, "\n"),
)