diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-09-13 14:34:57 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-09-13 14:50:49 +0200 |
| commit | 13fa2431ce628fbd8e64b18e40bb0eda2ae46058 (patch) | |
| tree | cdd60ca00241afd4ffc14e7218ddf379fb1268ec /README.md | |
| parent | 1caecc346a24c7e3e10e310ff564e8ec0e760ffa (diff) | |
| download | minishell_test-13fa2431ce628fbd8e64b18e40bb0eda2ae46058.tar.gz minishell_test-13fa2431ce628fbd8e64b18e40bb0eda2ae46058.tar.bz2 minishell_test-13fa2431ce628fbd8e64b18e40bb0eda2ae46058.zip | |
Added pager option
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 45 |
1 files changed, 26 insertions, 19 deletions
@@ -8,25 +8,42 @@ Test for the minishell project of school 42. The default path to your project is `..` but you can change it the the [configuration](src/config.py). -* `> ./run` - run all tests -* `> ./run [suite]...` - run specific test suites (e.g `./run builtin/echo`) - It tries to autocomplete your suite name so `./run int` -> `./run preprocess/interpolation` -* `> ./run --help` - show the help -* `> ./run -l` - list all suites and suites group +```sh +$ ./run` # run all tests + +$ ./run --help` +usage: run [-h] [-v] [-b] [-n] [-l] [-m] [-p] [suite [suite ...]] + +Minishell test + +positional arguments: + suite Test suites/group to run. + It tries to be smart and autocomplete the suite name + (e.g ./run int -> ./run preprocess/interpolation) + +optional arguments: + -h, --help show this help message and exit + -v, --verbose Increase verbosity level (e.g -vv == 2) + -b, --bonus Enable bonus tests + -n, --no-bonus Disable bonus tests + -l, --list Print available test suites + -m, --make Make minishell and exit + -p, --pager After running the test, display the result in a pager of your choice +``` ## Test compatibility Your executable **must** support the `-c` option which allow to pass command as string. ```sh -> bash -c 'echo bonjour je suis' +$ bash -c 'echo bonjour je suis' bonjour je suis -> ./minishell -c 'echo bonjour je suis' +$ ./minishell -c 'echo bonjour je suis' bonjour je suis -> bash -c 'ls' +$ bash -c 'ls' README.md test.sh -> ./minishell -c 'ls' +$ ./minishell -c 'ls' README.md test.sh ``` @@ -43,16 +60,6 @@ Their is 3 different method to enable the bonus tests: * Set the environment variable `MINISHELL_TEST_BONUS` to `yes` (e.g `echo 'export MINISHELL_TEST_BONUS=yes' >> ~/.zshrc`) -## Configuration - -The default configuration can be changed in [config.py](src/config.py) - -### Adding flags to reference shell - -Add them directly to the variable `REFERENCE_ARGS` in [config.py](src/config.py). -Or set the environment variable `MINISHELL_TEST_ARGS` to a comma separated list of arguments -(e.g `export MINISHELL_TEST_ARGS=--poxix,--someotherarg,etc`). - --- ## Add new tests |
