1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/v/tests/repl
2022-11-26 18:23:26 +02:00
..
chained_fields
conditional_blocks
immutable_len_fields
runner vfmt: change all '$expr' to '${expr}' (#16428) 2022-11-15 16:53:13 +03:00
.gitattributes
.gitignore
array_filter.repl
array_init.repl
array_method.repl vrepl: fix array method call errors (fix #15769) (#15786) 2022-09-17 10:12:01 +03:00
bad_in_type.repl.skip
default_printing.repl
empty_struct.repl.skip
entire_commented_module.repl
error_and_continue_print.repl vrepl: fix output errors (fix #15801) (#15804) 2022-09-18 14:09:31 +03:00
error_exitasdfasdf.repl vrepl: fix error for exitasdfasdf in repl (fix #14593) (#14598) 2022-06-02 19:59:57 +03:00
error_nosave.repl.skip vrepl: fix array method call errors (fix #15769) (#15786) 2022-09-17 10:12:01 +03:00
error.repl vrepl: fix array method call errors (fix #15769) (#15786) 2022-09-17 10:12:01 +03:00
fn_calls.repl repl: reproduce the void print function error (#13372) 2022-02-06 08:05:25 +02:00
function.repl.skip
import_alias.repl all: change optional to result in most of the libraries (#16123) 2022-10-20 22:14:33 +03:00
import.repl
naked_strings.repl
newlines.repl
nomain.repl
nothing.repl
open_close_string_check.repl
option.repl.skip
optional_call.repl
postfix_operators.repl
print_and_fn_call.repl vrepl: fix output error of print and fn call (#15796) 2022-09-17 15:58:53 +03:00
println.repl readline: fix bug that full-width spaces are treated as eof (#12763) 2021-12-08 22:35:21 +02:00
README.md
repl_test.v all: replace generic <> with [] - part 2 (#16536) 2022-11-26 18:23:26 +02:00
var_decl.repl
void_vlib_fncall.repl all: change optional to result of io (#16075) 2022-10-16 09:28:57 +03:00

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