v/vlib/v/tests/repl
Daniel Däschle d679146a80
fmt: remove space in front of ? and ! (#14366)
2022-05-13 06:56:21 +03:00
..
chained_fields all: fix struct names error 2020-05-27 19:12:34 +03:00
conditional_blocks
immutable_len_fields
runner fmt: remove space in front of ? and ! (#14366) 2022-05-13 06:56:21 +03:00
.gitattributes
.gitignore
README.md
array_filter.repl
array_init.repl
bad_in_type.repl.skip
default_printing.repl
empty_struct.repl.skip
entire_commented_module.repl
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