mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
repl_test: remove dependance on echo, use stdin redirection instead.
This commit is contained in:
parent
e1d2c83ff6
commit
41efe545f2
@ -8,9 +8,14 @@ fn test_repl() {
|
|||||||
assert false
|
assert false
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
input := content.all_before('===output===\n').replace('$', '\\$')
|
input_temporary_filename := 'input_temporary_filename.txt'
|
||||||
|
input := content.all_before('===output===\n')
|
||||||
output := content.all_after('===output===\n')
|
output := content.all_after('===output===\n')
|
||||||
r := os.exec('echo "$input" | ./v') or {
|
os.write_file(input_temporary_filename, input)
|
||||||
|
defer {
|
||||||
|
os.rm(input_temporary_filename)
|
||||||
|
}
|
||||||
|
r := os.exec('./v < $input_temporary_filename') or {
|
||||||
assert false
|
assert false
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user