1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/compiler/tests/repl
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
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
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_nosave.repl
error.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
README.md
repl_test.v repl: execute REPL tests ~1.5x to 2x faster 2020-01-20 23:04:26 +01:00
run.v tests: improved test output formatting 2019-12-30 05:23:54 +01:00
var_decl.repl

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