mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
repl: default printing fix and test
This commit is contained in:
parent
decdd8be9f
commit
2ba1edaa80
@ -1349,7 +1349,7 @@ fn run_repl() []string {
|
|||||||
}
|
}
|
||||||
lines << line
|
lines << line
|
||||||
vals := s.split('\n')
|
vals := s.split('\n')
|
||||||
for i:=0; i<vals.len-1; i++ {
|
for i:=0; i<vals.len; i++ {
|
||||||
println(vals[i])
|
println(vals[i])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
7
compiler/tests/repl/default_printing.repl
Normal file
7
compiler/tests/repl/default_printing.repl
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
num := 1
|
||||||
|
string := 'Hello'
|
||||||
|
num
|
||||||
|
string
|
||||||
|
===output===
|
||||||
|
1
|
||||||
|
Hello
|
Loading…
Reference in New Issue
Block a user