File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ println (arguments ()#[1 ..])
Original file line number Diff line number Diff line change 1+ import os
2+
3+ const vexe = os.getenv ('VEXE' )
4+ const vroot = os.dir (vexe)
5+
6+ fn test_v_run_simple () {
7+ echo_os_args := os.join_path (vroot, 'cmd/tools/test_os_args.v' )
8+ res123 := os.execute ('${os .quoted_path (vexe )} run ${os .quoted_path (echo_os_args )} 1 2 3' )
9+ println (res123 )
10+ assert res123 .exit_code == 0
11+ assert res123 .output.starts_with ("['1', '2', '3']" )
12+ }
13+
14+ fn test_v_run_quoted_args_with_spaces () {
15+ echo_os_args := os.join_path (vroot, 'cmd/tools/test_os_args.v' )
16+ res := os.execute ('${os .quoted_path (vexe )} run ${os .quoted_path (echo_os_args )} 1 "Learn V" 3' )
17+ println (res)
18+ assert res.exit_code == 0
19+ assert res.output.starts_with ("['1', 'Learn V', '3']" )
20+ }
You can’t perform that action at this time.
0 commit comments