Add --preview-window=default for resetting the options

This commit is contained in:
Junegunn Choi
2020-10-11 01:51:39 +09:00
parent 246b9f3130
commit 3248153d9f
4 changed files with 20 additions and 3 deletions

View File

@@ -417,6 +417,13 @@ func TestPreviewOpts(t *testing.T) {
opts.Preview.size.size == 15) {
t.Error(opts.Preview)
}
opts = optsFor("--preview=foo", "--preview-window=up", "--preview-window=default:70%")
if !(opts.Preview.command == "foo" &&
opts.Preview.position == posRight &&
opts.Preview.size.percent == true &&
opts.Preview.size.size == 70) {
t.Error(opts.Preview)
}
}
func TestAdditiveExpect(t *testing.T) {