diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2021-01-10 14:57:48 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2021-01-10 14:57:48 +0100 |
| commit | 294f4b2b424965f6dd1288544197fef21ed3da68 (patch) | |
| tree | 5b67e98a0b219644bb5687c8125164f4db325084 | |
| parent | 507dca876d68fc3913c41fcc0f4b33675a6dec6f (diff) | |
| parent | 15ad86e88a47b522238a8fa8fe61e0522bd158c8 (diff) | |
| download | minishell_test-294f4b2b424965f6dd1288544197fef21ed3da68.tar.gz minishell_test-294f4b2b424965f6dd1288544197fef21ed3da68.tar.bz2 minishell_test-294f4b2b424965f6dd1288544197fef21ed3da68.zip | |
Merge branch 'master' of github.com:cacharle/minishell_test
| -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 |
