From 7c2ffd3fef3f9131ee448a5f40d91835c8bd814d Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Thu, 20 Jun 2024 23:18:28 +0900 Subject: Make transform*, --info-command, and execute-silent cancellable Users can press CTRL-C after 1 second to terminate the command. Close #3883 --- src/util/util_test.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/util/util_test.go') diff --git a/src/util/util_test.go b/src/util/util_test.go index 013f3c23..36d71bde 100644 --- a/src/util/util_test.go +++ b/src/util/util_test.go @@ -137,8 +137,11 @@ func TestOnce(t *testing.T) { if o() { t.Error("Expected: false") } - if o() { - t.Error("Expected: false") + if !o() { + t.Error("Expected: true") + } + if !o() { + t.Error("Expected: true") } o = Once(true) @@ -148,6 +151,9 @@ func TestOnce(t *testing.T) { if o() { t.Error("Expected: false") } + if o() { + t.Error("Expected: false") + } } func TestRunesWidth(t *testing.T) { -- cgit v1.2.3