diff options
| -rw-r--r-- | README.md | 4 | ||||
| -rw-r--r-- | src/test/test.py | 8 |
2 files changed, 6 insertions, 6 deletions
@@ -8,7 +8,7 @@ Test for the minishell project of school 42. The default path to your project is `../minishell` but you can change it the the [configuration](src/config.py). -```sh +```command $ ./run # run all tests $ ./run --help @@ -51,7 +51,7 @@ Good luck handling `*'.*'`. Your executable **must** support the `-c` option which allow to pass command as string. -```sh +```command $ bash -c 'echo bonjour je suis' bonjour je suis $ ./minishell -c 'echo bonjour je suis' diff --git a/src/test/test.py b/src/test/test.py index c101193..ef9efb2 100644 --- a/src/test/test.py +++ b/src/test/test.py @@ -6,7 +6,7 @@ # By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2020/06/16 21:48:50 by charles #+# #+# # -# Updated: 2020/10/15 08:50:05 by cacharle ### ########.fr # +# Updated: 2020/12/14 17:53:40 by charles ### ########.fr # # # # ############################################################################ # @@ -146,9 +146,9 @@ class Test: def full_cmd(self): """ Return the command prefixed by the setup and exports """ s = self.cmd - if self.setup != "": - s = "[SETUP {}] {}".format(self.setup, s) if len(self.exports) != 0: s = "[EXPORTS {}] {}".format( - ' '.join(["{}='{:.20}'".format(k, v) for k, v in self.exports.items()]), s) + ' '.join(["{}='{}'".format(k, v) for k, v in self.exports.items()]), s) + if self.setup != "": + s = "[SETUP {}] {}".format(self.setup, s) return s |
