m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-14 14:23:47 -05:00

Defer resetting multi-selection on reload

This commit is contained in:
Junegunn Choi
2019-12-09 21:32:58 +09:00
parent af1a5f130b
commit 2b725a4db5
4 changed files with 41 additions and 10 deletions

View File

@@ -20,3 +20,21 @@ func TestContrain(t *testing.T) {
t.Error("Expected", 3)
}
}
func TestOnce(t *testing.T) {
o := Once(false)
if o() {
t.Error("Expected: false")
}
if o() {
t.Error("Expected: false")
}
o = Once(true)
if !o() {
t.Error("Expected: true")
}
if o() {
t.Error("Expected: false")
}
}