forked from AlecAivazis/survey
/
input.go
31 lines (27 loc) · 797 Bytes
/
input.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package main
import (
"gopkg.in/AlecAivazis/survey.v1"
"gopkg.in/AlecAivazis/survey.v1/tests/util"
)
var val = ""
var table = []TestUtil.TestTableEntry{
{
"no default", &survey.Input{Message: "Hello world"}, &val, nil,
},
{
"default", &survey.Input{Message: "Hello world", Default: "default"}, &val, nil,
},
{
"no help, send '?'", &survey.Input{Message: "Hello world"}, &val, nil,
},
{
"Home, End Button test in random location", &survey.Input{Message: "Hello world"}, &val, nil,
}, {
"Delete and forward delete test at random location (test if screen overflows)", &survey.Input{Message: "Hello world"}, &val, nil,
}, {
"Moving around lines with left & right arrow keys", &survey.Input{Message: "Hello world"}, &val, nil,
},
}
func main() {
TestUtil.RunTable(table)
}