mirror of
https://github.com/vlang/v.git
synced 2025-09-16 16:02:29 +03:00
compiler: produce errors in C "filepath:line:column:" format
This commit is contained in:
parent
9b3b22d6b3
commit
77b31de117
5 changed files with 47 additions and 10 deletions
|
@ -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')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue