diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2021-02-28 20:41:21 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2021-02-28 20:41:21 +0100 |
| commit | 072ec79b51cb4af45b168bf6f73941d1de94c8ae (patch) | |
| tree | 7b7c5e97ba1980d51a1e9a258186d335d32f6e3e /docs/index.rst | |
| parent | 50c413b6f3c02c63b143ad4abf2e357cf7b2fbb0 (diff) | |
| download | minishell_test-072ec79b51cb4af45b168bf6f73941d1de94c8ae.tar.gz minishell_test-072ec79b51cb4af45b168bf6f73941d1de94c8ae.tar.bz2 minishell_test-072ec79b51cb4af45b168bf6f73941d1de94c8ae.zip | |
Added full config documentation, Splitting original README in multiple doc pages
Diffstat (limited to 'docs/index.rst')
| -rw-r--r-- | docs/index.rst | 73 |
1 files changed, 9 insertions, 64 deletions
diff --git a/docs/index.rst b/docs/index.rst index 043c7a2..ec08d8f 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -4,73 +4,18 @@ minishell_test documentation ============================ .. toctree:: - :maxdepth: 1 + :maxdepth: 2 + gettingstarted config options + bonus + memory_leaks + linux + custom_test + disclaimer developers -.. include:: gettingstarted.rst - -Environement variables ----------------------- - -This test only gives the ``PATH`` and ``TERM`` environment variables to your minishell by default (see :ref:`config env`). - -You can test this quickly with :option:`--try`. - -.. warning:: - Please check that your project still work with this environment before creating an issue or messaging me on Slack. - -Bonus ------ +.. include:: disclaimer.rst -See :ref:`config bonus` -See :ref:`options bonus` - -Memory leaks ------------- - -See :ref:`options leaks` - -Linux ------ - -It will try to convert to output/status code of ``bash`` on Linux to the one on Mac. - -.. Add individual test -.. ------------------- -.. -.. In your suite function you can use the `test` function. With the following arguments: -.. -.. 1. Command to be tested (output and status will be compared to bash) -.. 2. A command to setup the sandbox directory where the tested command will be run -.. 3. List of files to watch (the content of each file will be compared) -.. -.. ```python -.. test("echo bonjour je suis") # simple command -.. test("cat < somefile", setup="echo file content > somefile") # setup -.. test("ls > somefile", setup="", files=["somefile"]) # watch a file -.. test("echo $A", exports={"A": "a"}) # export variables -.. # in the environment -.. test("echo bonjour", hook=lambda s: s.replace("o", "a")) # pass the shell output -.. # through a hook function -.. -.. test("cat < somefile > otherfile", -.. setup="echo file content > somefile", -.. files=["otherfile"]) -.. ``` -.. -.. ### Add Suite -.. -.. A test suite is a group of related tests. -.. -.. ```python -.. @suite() # @suite(bonus=True) if it's a bonus suite -.. def suite_yoursuitename(test): -.. """ a description of the suite """ -.. test(...) -.. test(...) -.. test(...) -.. ``` -.. +.. include:: gettingstarted.rst |
