AlecAivazis / survey

A golang library for building interactive and accessible prompts with full support for windows and posix terminals.
MIT License
4.07k stars 351 forks source link

GNU/Linux requirments for passing tests #396

Closed Hellseher closed 2 years ago

Hellseher commented 2 years ago

What operating system and terminal are you using? Guix chroot build environment with restricted controled inputs and env vars.

An example that showcases the bug.

--- FAIL: TestAsk (0.00s)
    --- FAIL: TestAsk/Test_Ask_for_all_prompts (0.00s)
        Error Trace:    survey_posix_test.go:31
                        survey_test.go:315
        Error:          Expected nil, but got: &exec.Error{Name:"vi", Err:(*errors.errorString)(0xc00006c390)}
        Test:           TestAsk/Test_Ask_for_all_prompts
FAIL
FAIL    github.com/AlecAivazis/survey   0.071s
FAIL
error: in phase 'check': uncaught exception:
%exception #<&invoke-error program: "go" arguments: ("test" "github.com/AlecAivazis/survey") exit-status: 1 term-signal: #f stop-signal: #f>
phase `check' failed after 1.7 seconds
command "go" "test" "github.com/AlecAivazis/survey" failed with status 1

What did you expect to see? Passing tests

What did you see instead? Test failed on survey_posix_test.go and survey_test.go


I tried to set EDITOR=<path-to-vim-binary> but tests still failing with the same error. May you list all required envars and binaries which survey tries to relay on during running tests, please?

mislav commented 2 years ago

Hi, sorry for the nuisance. Currently, it looks like you need to have vi in your PATH in order to pass tests. It doesn't seem like EDITOR has any effect here.