v/vlib/v/tests/repl
Tim Basel 9d0a5942ac
builtin: change IError `msg` and `code` to methods + fix vlib, add a deprecation notice for the old usages (#13041)
2022-02-11 15:52:33 +02:00
..
chained_fields
conditional_blocks
immutable_len_fields
runner builtin: change IError `msg` and `code` to methods + fix vlib, add a deprecation notice for the old usages (#13041) 2022-02-11 15:52:33 +02:00
.gitattributes
.gitignore
README.md
array_filter.repl vrepl: fix array_filter (#9104) 2021-03-04 12:24:14 +02:00
array_init.repl
bad_in_type.repl.skip
default_printing.repl
empty_struct.repl.skip
entire_commented_module.repl builder: show file:line when import fails (#8537) 2021-02-04 09:09:54 +02:00
error.repl
error_nosave.repl.skip
fn_calls.repl repl: reproduce the void print function error (#13372) 2022-02-06 08:05:25 +02:00
function.repl.skip
import.repl
import_alias.repl repl: support aliased module imports too (#13423) 2022-02-11 15:03:14 +02:00
naked_strings.repl
newlines.repl
nomain.repl
nothing.repl
open_close_string_check.repl
option.repl.skip
optional_call.repl
postfix_operators.repl
println.repl readline: fix bug that full-width spaces are treated as eof (#12763) 2021-12-08 22:35:21 +02:00
repl_test.v builtin: change IError `msg` and `code` to methods + fix vlib, add a deprecation notice for the old usages (#13041) 2022-02-11 15:52:33 +02:00
var_decl.repl
void_vlib_fncall.repl repl: reproduce the void print function error (#13372) 2022-02-06 08:05:25 +02:00

README.md

V REPL Tests Script

How to write a new test

  • Create a new file named *.repl
  • Write the input to be given to REPL
  • Add ===output===
  • Write the output expected

Notes

Keep in mind, that the way V repl works for now, every non empty line would cause a new recompilation of the entire repl content that was collected so far.

Longer REPL files would cause measurably longer recompilation/testing times.

Also, longer repl files would be slower to debug when they fail, It is better to have several smaller files vs one huge REPL file.

Example :

a := 1
println(a)
===output===
1