mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
CONTRIBUTING: Enhance the "testing" section
Link to littlecheck, explain where pexpect is being setup, [ci skip]
This commit is contained in:
parent
9567df4b15
commit
2fef089c91
1 changed files with 3 additions and 6 deletions
|
@ -263,17 +263,14 @@ regressions in the future (i.e., we don’t reintroduce the bug).
|
||||||
The tests can be found in three places:
|
The tests can be found in three places:
|
||||||
|
|
||||||
- src/fish_tests.cpp for tests to the core C++ code
|
- src/fish_tests.cpp for tests to the core C++ code
|
||||||
- tests/checks for script tests
|
- tests/checks for script tests, run by [littlecheck](https://github.com/ridiculousfish/littlecheck)
|
||||||
- tests/pexpects for interactive tests using pexpect
|
- 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.
|
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.
|
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.
|
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.
|
||||||
|
|
||||||
Fish also depends on ``diff`` and `pexpect
|
|
||||||
<https://pexpect.readthedocs.io/en/stable/>`__ for its tests.
|
|
||||||
|
|
||||||
Local testing
|
Local testing
|
||||||
~~~~~~~~~~~~~
|
~~~~~~~~~~~~~
|
||||||
|
|
Loading…
Reference in a new issue