Skip to content
This repository was archived by the owner on Apr 19, 2024. It is now read-only.

Commit c07023a

Browse files
authored
Skip vi-dependent tests when there is no vi in PATH (#397)
1 parent 099a968 commit c07023a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

survey_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package survey
22

33
import (
44
"errors"
5+
"os/exec"
56
"strings"
67
"testing"
78
"time"
@@ -170,6 +171,10 @@ func TestPagination_lastHalf(t *testing.T) {
170171
}
171172

172173
func TestAsk(t *testing.T) {
174+
if _, err := exec.LookPath("vi"); err != nil {
175+
t.Skip("vi not found in PATH")
176+
}
177+
173178
tests := []struct {
174179
name string
175180
questions []*Question

0 commit comments

Comments
 (0)