v/vlib/compiler/tests/repl
Delyan Angelov 88b402fcf8
bugfix: v should not panic when encountering a file that consists only of comments
2020-02-20 22:59:47 +01:00
..
chained_fields repl: execute REPL tests ~1.5x to 2x faster 2020-01-20 23:04:26 +01:00
conditional_blocks repl: execute REPL tests ~1.5x to 2x faster 2020-01-20 23:04:26 +01:00
immutable_len_fields repl: execute REPL tests ~1.5x to 2x faster 2020-01-20 23:04:26 +01:00
runner bugfix: v should not panic when encountering a file that consists only of comments 2020-02-20 22:59:47 +01:00
.gitattributes
.gitignore
README.md
bad_in_type.repl
default_printing.repl repl: execute REPL tests ~1.5x to 2x faster 2020-01-20 23:04:26 +01:00
empty_struct.repl compiler: make compiler an ordinary vlib/compiler module 2019-10-13 16:37:43 +03:00
entire_commented_module.repl bugfix: v should not panic when encountering a file that consists only of comments 2020-02-20 22:59:47 +01:00
error.repl
error_nosave.repl
function.repl repl: execute REPL tests ~1.5x to 2x faster 2020-01-20 23:04:26 +01:00
multiple_decl.repl repl: execute REPL tests ~1.5x to 2x faster 2020-01-20 23:04:26 +01:00
multiple_println.repl
naked_strings.repl repl: execute REPL tests ~1.5x to 2x faster 2020-01-20 23:04:26 +01:00
newlines.repl repl: execute REPL tests ~1.5x to 2x faster 2020-01-20 23:04:26 +01:00
nomain.repl
nothing.repl
open_close_string_check.repl repl: execute REPL tests ~1.5x to 2x faster 2020-01-20 23:04:26 +01:00
option.repl repl: execute REPL tests ~1.5x to 2x faster 2020-01-20 23:04:26 +01:00
postfix_operators.repl repl: execute REPL tests ~1.5x to 2x faster 2020-01-20 23:04:26 +01:00
println.repl compiler: make compiler an ordinary vlib/compiler module 2019-10-13 16:37:43 +03:00
repl_test.v repl: execute REPL tests ~1.5x to 2x faster 2020-01-20 23:04:26 +01: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