From 2fef089c917db05fe9ebe1fcd2ded9069950b0ee Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Mon, 30 Nov 2020 18:28:24 +0100 Subject: [PATCH] CONTRIBUTING: Enhance the "testing" section Link to littlecheck, explain where pexpect is being setup, [ci skip] --- CONTRIBUTING.rst | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 1014e6085..f1507b9f1 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -263,17 +263,14 @@ regressions in the future (i.e., we don’t reintroduce the bug). The tests can be found in three places: - src/fish_tests.cpp for tests to the core C++ code -- tests/checks for script tests -- tests/pexpects for interactive tests using pexpect +- tests/checks for script tests, run by [littlecheck](https://github.com/ridiculousfish/littlecheck) +- tests/pexpects for interactive tests using [pexpect](https://pexpect.readthedocs.io/en/stable/) When in doubt, the bulk of the tests should be added as a littlecheck test in tests/checks, as they are the easiest to modify and run, and much faster and more dependable than pexpect tests. The syntax is fairly self-explanatory. It's a fish script with the expected output in ``# CHECK:`` or ``# CHECKERR:`` (for stderr) comments. fish_tests.cpp is mostly useful for unit tests - if you wish to test that a function does the correct thing for given input, use it. -The pexpects are written in python and can simulate input and output to/from a terminal, so they are needed for anything that needs actual interactivity. - -Fish also depends on ``diff`` and `pexpect -`__ for its tests. +The pexpects are written in python and can simulate input and output to/from a terminal, so they are needed for anything that needs actual interactivity. The runner is in build_tools/pexpect_helper.py, in case you need to modify something there. Local testing ~~~~~~~~~~~~~