diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-09-13 10:52:37 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-09-13 10:52:37 +0200 |
| commit | 740b810ab1aaa3506d004d01f21e3cfc270fbcfc (patch) | |
| tree | 6c1f77e7227156e70e1d7636d91c080060d65ec9 | |
| parent | 31e2aac7631f844349012f8d7122b1294c79fa53 (diff) | |
| download | minishell_test-740b810ab1aaa3506d004d01f21e3cfc270fbcfc.tar.gz minishell_test-740b810ab1aaa3506d004d01f21e3cfc270fbcfc.tar.bz2 minishell_test-740b810ab1aaa3506d004d01f21e3cfc270fbcfc.zip | |
Added environment variable for bonus test
| -rw-r--r-- | README.md | 11 | ||||
| -rwxr-xr-x | src/main.py | 2 |
2 files changed, 11 insertions, 2 deletions
@@ -9,7 +9,7 @@ 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`) +* `> ./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 @@ -32,6 +32,15 @@ README.md test.sh This allows you to set the prompt to whatever you want. +## Bonus + +Their is 3 different method to enable the bonus tests: + +* Force the bonus tests with `./run -b` +* Change the `BONUS` variable in [config.py](src/config.py) to True +* Set the environment variable `MINISHELL_TEST_BONUS` to `yes` + (e.g `echo 'export MINISHELL_TEST_BONUS=yes' >> ~/.zshrc`) + ## Python Version This test works with python >= 3.5. diff --git a/src/main.py b/src/main.py index 9b49ce8..efdfc2f 100755 --- a/src/main.py +++ b/src/main.py @@ -51,7 +51,7 @@ def main(): os.path.join(config.EXECUTABLES_PATH, cmd)) config.VERBOSE_LEVEL = args.verbose - if args.bonus: + if args.bonus or os.environ.get("MINISHELL_TEST_BONUS") == "yes": config.BONUS = True if args.no_bonus: config.BONUS = False |
