aboutsummaryrefslogtreecommitdiff
path: root/v_windows/v/vlib/readline/readline_test.v
blob: ab5154f38df216e480cd6f58df77ab8ccf0c450c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import readline { Readline }

fn no_lines(s string) string {
	return s.replace('\n', ' ')
}

fn test_struct_readline() {
	// mut rl := Readline{}
	// eprintln('rl: $rl')
	// line := rl.read_line('Please, enter your name: ') or { panic(err) }
	// eprintln('line: $line')
	mut methods := []string{}
	$for method in Readline.methods {
		// eprintln('  method: $method.name | ' + no_lines('$method'))
		methods << method.name
	}
	// eprintln('methods: $methods')
	assert 'read_line_utf8' in methods
	assert 'read_line' in methods
}