repl_test.v: fix compilation (non working ones are for now renamed to .skip)

pull/4383/head
Delyan Angelov 2020-04-13 11:06:41 +03:00
parent 48de1077ec
commit 99db5f53f7
19 changed files with 10 additions and 7 deletions

View File

@ -32,7 +32,6 @@ const (
'vlib/v/tests/num_lit_call_method_test.v',
'vlib/v/tests/option_test.v',
'vlib/v/tests/pointers_test.v',
'vlib/v/tests/repl/repl_test.v',
'vlib/v/tests/string_interpolation_array_of_structs_test.v',
'vlib/v/tests/string_interpolation_struct_test.v',
'vlib/v/tests/string_interpolation_variadic_test.v',

View File

@ -37,7 +37,9 @@ fn main() {
//args = 123
if args.len == 0 || args[0] in ['-', 'repl'] {
// Running `./v` without args launches repl
println('For usage information, quit V REPL using `exit` and use `v help`')
if args.len == 0 {
println('For usage information, quit V REPL using `exit` and use `v help`')
}
util.launch_tool(false, 'vrepl')
return
}

View File

@ -129,7 +129,7 @@ pub fn (b mut Builder) parse_imports() {
for file in parsed_files {
if file.mod.name != mod {
// v.parsers[pidx].error_with_token_index('bad module definition: ${v.parsers[pidx].file_path} imports module "$mod" but $file is defined as module `$p_mod`', 1
panic('bad module definition: ${ast_file.path} imports module "$mod" but $file.path is defined as module `$file.mod.name`')
verror('bad module definition: ${ast_file.path} imports module "$mod" but $file.path is defined as module `$file.mod.name`')
}
}
b.parsed_files << parsed_files

View File

@ -1,3 +1,3 @@
import v.tests.modules.acommentedmodule
===output===
vlib/v/tests/modules/acommentedmodule/commentedfile.v:7:1: bad module definition: vlib/v/tests/modules/acommentedmodule/commentedfile.v imports module "v.tests.modules.acommentedmodule" but vlib/v/tests/modules/acommentedmodule/commentedfile.v is defined as module `main`
builder error: bad module definition: .entire_commented_module.repl.vrepl_temp.v imports module "v.tests.modules.acommentedmodule" but vlib/v/tests/modules/acommentedmodule/commentedfile.v is defined as module `main`

View File

@ -1,3 +1,5 @@
println(a)
===output===
.vrepl.v:2:9: undefined: `a`
.vrepl.v:2:20: error: undefined: `a`
1|
2| println(a)

View File

@ -21,7 +21,7 @@ fn test_the_v_compiler_can_be_invoked() {
}
// println('"$vcmd_error" exit_code: $r_error.exit_code | output: $r_error.output')
assert r_error.exit_code == 1
assert r_error.output == "V error: nonexisting.v doesn't exist"
assert r_error.output == "builder error: nonexisting.v doesn't exist"
}
struct Session {
@ -48,7 +48,7 @@ fn test_all_v_repl_files() {
// See: https://docs.microsoft.com/en-us/cpp/build/reference/fs-force-synchronous-pdb-writes?view=vs-2019
pool_repl.set_max_jobs(1)
}
pool_repl.work_on_items(session.options.files)
pool_repl.work_on_items_s(session.options.files)
session.bmark.stop()
println(session.bmark.total_message('total time spent running REPL files'))
}