mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: produce errors in C "filepath:line:column:" format
This commit is contained in:

committed by
Alexander Medvednikov

parent
9b3b22d6b3
commit
77b31de117
@@ -1,3 +1,3 @@
|
||||
println(a)
|
||||
===output===
|
||||
.vrepl.v:2 undefined: `a`
|
||||
.vrepl.v:2:9: undefined: `a`
|
||||
|
@@ -1,5 +1,5 @@
|
||||
a
|
||||
33
|
||||
===output===
|
||||
.vrepl_temp.v:2 undefined: `a`
|
||||
.vrepl_temp.v:2:9: undefined: `a`
|
||||
33
|
||||
|
@@ -2,7 +2,7 @@ import os
|
||||
|
||||
fn test_repl() {
|
||||
test_files := os.walk_ext('.', '.repl')
|
||||
|
||||
wd := os.getwd() + '/'
|
||||
for file in test_files {
|
||||
content := os.read_file(file) or {
|
||||
assert false
|
||||
@@ -19,7 +19,7 @@ fn test_repl() {
|
||||
assert false
|
||||
break
|
||||
}
|
||||
result := r.output.replace('>>> ', '').replace('>>>', '').replace('... ', '').all_after('Use Ctrl-C or `exit` to exit\n')
|
||||
result := r.output.replace('>>> ', '').replace('>>>', '').replace('... ', '').all_after('Use Ctrl-C or `exit` to exit\n').replace( wd, '' )
|
||||
assert result == output
|
||||
if result != output {
|
||||
println(file)
|
||||
@@ -27,4 +27,4 @@ fn test_repl() {
|
||||
println('Expected : $output')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user