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

Skip vi-dependent tests when there is no vi in PATH #397

Merged
merged 4 commits into from Mar 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions survey_test.go
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