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-03-07 22:26:26 +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 os: merge with filepath 2020-03-07 22:26:26 +01:00
.gitattributes
.gitignore
bad_in_type.repl parser: check types in a in b expressions 2019-12-04 22:17:24 +03:00
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 update repls tests 2019-11-13 20:40:01 +03:00
error.repl parser: undefined error 2019-10-20 20:47:27 +03:00
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 tests: no main fn 2019-10-13 17:50:55 +03:00
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 os: merge with filepath 2020-03-07 22:26: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