mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-14 02:57:52 +08:00
e9d328aa16
This allows turning the following pattern in tests: value, cleanup := setupSomething() defer cleanup() into the following: value := setupSomething(t)
24 lines
350 B
Go
24 lines
350 B
Go
package edit
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"src.elv.sh/pkg/cli/term"
|
|
)
|
|
|
|
func TestMinibuf(t *testing.T) {
|
|
f := setup(t)
|
|
|
|
evals(f.Evaler, `edit:minibuf:start`)
|
|
f.TestTTY(t,
|
|
"~> \n",
|
|
" MINIBUF ", Styles,
|
|
"********* ", term.DotHere,
|
|
)
|
|
feedInput(f.TTYCtrl, "edit:insert-at-dot put\n")
|
|
f.TestTTY(t,
|
|
"~> put", Styles,
|
|
" vvv", term.DotHere,
|
|
)
|
|
}
|