1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

test-fixed: always chdir to main v folder before running the tests

This commit is contained in:
Delyan Angelov 2020-04-10 22:40:56 +03:00
parent 217e6f3b8e
commit 4f74410125
2 changed files with 4 additions and 1 deletions

View File

@ -21,7 +21,6 @@ const (
'vlib/net/ftp/ftp_test.v',
'vlib/net/http/http_httpbin_test.v',
'vlib/net/http/http_test.v',
'vlib/net/socket_test.v',
'vlib/regex/regex_test.v',
'vlib/sqlite/sqlite_test.v', // Linux only
'vlib/strconv/ftoa/f32_f64_to_string_test.v',
@ -56,6 +55,7 @@ const (
fn main() {
vexe := pref.vexe_path()
vroot := os.dir(vexe)
os.chdir(vroot)
args := os.args
args_string := args[1..].join(' ')
cmd_prefix := args_string.all_before('test-fixed')

View File

@ -130,6 +130,9 @@ pub fn (x Expr) str() string {
CastExpr {
return '${it.typname}(${it.expr.str()})'
}
SelectorExpr {
return '${it.expr.str()}.${it.field}'
}
CallExpr {
sargs := args2str(it.args)
if it.is_method {