v/compiler/tests/repl
Delyan Angelov 3fbfc5fbd4 repl: tests show difference (in color where available) 2019-09-25 22:00:56 +03:00
..
runner repl: tests show difference (in color where available) 2019-09-25 22:00:56 +03:00
.gitattributes os: fix exec() and get_raw_line(); fix Windows tests and examples 2019-08-26 13:51:48 +03:00
.gitignore repl: tests show difference (in color where available) 2019-09-25 22:00:56 +03:00
README.md repl: add more stats and tests; compiler: tcc fixes 2019-09-16 00:41:12 +03:00
arr_decl.repl
chained_fields.correct.repl repl: add more stats and tests; compiler: tcc fixes 2019-09-16 00:41:12 +03:00
chained_fields.repl compiler/vlib: add error for no new vars in loop ("_,_") & remove "." from errors 2019-09-25 17:59:50 +03:00
conditional_blocks.repl repl: functions and conditional blocks support 2019-08-18 22:50:38 +03:00
default_printing.repl tests: v implementation of repl tests 2019-08-18 19:26:55 +03:00
empty_struct.repl repl: add more stats and tests; compiler: tcc fixes 2019-09-16 00:41:12 +03:00
error.repl compiler: produce errors in C "filepath:line:column:" format 2019-08-22 14:15:11 +03:00
error_nosave.repl compiler: produce errors in C "filepath:line:column:" format 2019-08-22 14:15:11 +03:00
function.repl repl: functions and conditional blocks support 2019-08-18 22:50:38 +03:00
immutable_len_fields.repl repl: add more stats and tests; compiler: tcc fixes 2019-09-16 00:41:12 +03:00
interpolation.repl
multiple_decl.repl
multiple_println.repl
naked_strings.repl Fix incorrect string open/close check in REPL 2019-08-29 21:40:49 +03:00
newlines.repl
nothing.repl
println.repl windows: Unicode input in REPL 2019-09-20 17:03:13 +03:00
repl_test.v new benchmark module + make the tests use it 2019-09-16 17:29:06 +03:00
run.v new benchmark module + make the tests use it 2019-09-16 17:29:06 +03:00
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