1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/v/tests/repl
Alexander Medvednikov f627710870 fix repl tests
2020-03-27 20:49:20 +01:00
..
chained_fields move compiler tests from compiler/ to v/ 2020-03-27 18:01:46 +01:00
conditional_blocks move compiler tests from compiler/ to v/ 2020-03-27 18:01:46 +01:00
immutable_len_fields move compiler tests from compiler/ to v/ 2020-03-27 18:01:46 +01:00
runner move compiler tests from compiler/ to v/ 2020-03-27 18:01:46 +01:00
.gitattributes move compiler tests from compiler/ to v/ 2020-03-27 18:01:46 +01:00
.gitignore move compiler tests from compiler/ to v/ 2020-03-27 18:01:46 +01:00
bad_in_type.repl move compiler tests from compiler/ to v/ 2020-03-27 18:01:46 +01:00
default_printing.repl move compiler tests from compiler/ to v/ 2020-03-27 18:01:46 +01:00
empty_struct.repl move compiler tests from compiler/ to v/ 2020-03-27 18:01:46 +01:00
entire_commented_module.repl fix repl tests 2020-03-27 20:49:20 +01:00
error_nosave.repl move compiler tests from compiler/ to v/ 2020-03-27 18:01:46 +01:00
error.repl move compiler tests from compiler/ to v/ 2020-03-27 18:01:46 +01:00
function.repl move compiler tests from compiler/ to v/ 2020-03-27 18:01:46 +01:00
multiple_decl.repl move compiler tests from compiler/ to v/ 2020-03-27 18:01:46 +01:00
multiple_println.repl move compiler tests from compiler/ to v/ 2020-03-27 18:01:46 +01:00
naked_strings.repl move compiler tests from compiler/ to v/ 2020-03-27 18:01:46 +01:00
newlines.repl move compiler tests from compiler/ to v/ 2020-03-27 18:01:46 +01:00
nomain.repl move compiler tests from compiler/ to v/ 2020-03-27 18:01:46 +01:00
nothing.repl move compiler tests from compiler/ to v/ 2020-03-27 18:01:46 +01:00
open_close_string_check.repl move compiler tests from compiler/ to v/ 2020-03-27 18:01:46 +01:00
option.repl move compiler tests from compiler/ to v/ 2020-03-27 18:01:46 +01:00
postfix_operators.repl move compiler tests from compiler/ to v/ 2020-03-27 18:01:46 +01:00
println.repl move compiler tests from compiler/ to v/ 2020-03-27 18:01:46 +01:00
README.md move compiler tests from compiler/ to v/ 2020-03-27 18:01:46 +01:00
repl_test.v move compiler tests from compiler/ to v/ 2020-03-27 18:01:46 +01:00
run.v move compiler tests from compiler/ to v/ 2020-03-27 18:01:46 +01:00
var_decl.repl move compiler tests from compiler/ to v/ 2020-03-27 18:01:46 +01: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