v/vlib/v/tests/repl
Delyan Angelov b18915df62
tests: cleanup long running repl tests (replaced by faster ordinary tests in vlib/v/tests/)
2020-12-05 08:52:08 +02:00
..
chained_fields
conditional_blocks
immutable_len_fields
runner checker: update tests 2020-10-15 12:39:32 +02:00
.gitattributes
.gitignore
README.md
array_init.repl
bad_in_type.repl.skip
default_printing.repl tests: cleanup long running repl tests (replaced by faster ordinary tests in vlib/v/tests/) 2020-12-05 08:52:08 +02:00
empty_struct.repl.skip
entire_commented_module.repl
error.repl compiler: remove space at the end of warn/error messages to minimize diff churn 2020-07-29 20:37:55 +03:00
error_nosave.repl.skip
function.repl.skip
import.repl
naked_strings.repl tests: cleanup long running repl tests (replaced by faster ordinary tests in vlib/v/tests/) 2020-12-05 08:52:08 +02:00
newlines.repl
nomain.repl
nothing.repl
open_close_string_check.repl
option.repl.skip
optional_call.repl vrepl: fix optional call 2020-06-24 12:45:48 +02:00
postfix_operators.repl
println.repl tests: cleanup long running repl tests (replaced by faster ordinary tests in vlib/v/tests/) 2020-12-05 08:52:08 +02:00
repl_test.v tests: fix repl_test.v 2020-08-25 15:59:07 +03:00
run.v
var_decl.repl

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