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

Commit

Permalink
Skip vi-dependent tests when there is no vi in PATH (#397)
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav authored Mar 17, 2022
1 parent 099a968 commit c07023a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions survey_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package survey

import (
"errors"
"os/exec"
"strings"
"testing"
"time"
Expand Down Expand Up @@ -170,6 +171,10 @@ func TestPagination_lastHalf(t *testing.T) {
}

func TestAsk(t *testing.T) {
if _, err := exec.LookPath("vi"); err != nil {
t.Skip("vi not found in PATH")
}

tests := []struct {
name string
questions []*Question
Expand Down

0 comments on commit c07023a

Please sign in to comment.