mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-04-21 12:16:54 +02:00
Fix reporting of unexpected selections in integration tests
Expected and actual selection were swapped in the error message.
This commit is contained in:
parent
c08a5fe4e7
commit
43e04febee
@ -263,8 +263,8 @@ func (self *ViewDriver) assertLines(offset int, matchers ...*TextMatcher) *ViewD
|
|||||||
return false, fmt.Sprintf(
|
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",
|
"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(),
|
view.Name(),
|
||||||
formatLineRange(startIdx, endIdx),
|
|
||||||
formatLineRange(expectedStartIdx, expectedEndIdx),
|
formatLineRange(expectedStartIdx, expectedEndIdx),
|
||||||
|
formatLineRange(startIdx, endIdx),
|
||||||
strings.Join(expectedSelectedLines, "\n"),
|
strings.Join(expectedSelectedLines, "\n"),
|
||||||
strings.Join(lines, "\n"),
|
strings.Join(lines, "\n"),
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user