mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-25 14:32:14 +02:00
Add extra require to ensure that the next line doesn't panic if the string isn't present, since that interferes with gotestsum
This commit is contained in:
parent
72be3ee0c7
commit
a180c850a9
@ -1652,6 +1652,7 @@ func testTui_resize(t *testing.T) {
|
|||||||
{Keys: "hishtory SPACE tquery ENTER"},
|
{Keys: "hishtory SPACE tquery ENTER"},
|
||||||
{ResizeX: 300, ResizeY: 100},
|
{ResizeX: 300, ResizeY: 100},
|
||||||
})
|
})
|
||||||
|
require.Contains(t, out, "hishtory tquery")
|
||||||
out = strings.TrimSpace(strings.Split(out, "hishtory tquery")[1])
|
out = strings.TrimSpace(strings.Split(out, "hishtory tquery")[1])
|
||||||
testutils.CompareGoldens(t, out, "TestTui-Resize")
|
testutils.CompareGoldens(t, out, "TestTui-Resize")
|
||||||
|
|
||||||
@ -1669,6 +1670,7 @@ func testTui_resize(t *testing.T) {
|
|||||||
{Keys: "hishtory SPACE tquery ENTER"},
|
{Keys: "hishtory SPACE tquery ENTER"},
|
||||||
{Keys: "1234567890qwertyuip1234567890qwertyuip1234567890qwertyuip1234567890qwertyuip1234567890qwertyuip"},
|
{Keys: "1234567890qwertyuip1234567890qwertyuip1234567890qwertyuip1234567890qwertyuip1234567890qwertyuip"},
|
||||||
})
|
})
|
||||||
|
require.Contains(t, out, "hishtory tquery")
|
||||||
out = strings.TrimSpace(strings.Split(out, "hishtory tquery")[1])
|
out = strings.TrimSpace(strings.Split(out, "hishtory tquery")[1])
|
||||||
testutils.CompareGoldens(t, out, "TestTui-LongQuery")
|
testutils.CompareGoldens(t, out, "TestTui-LongQuery")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user