diff options
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/captured.py | 7 | ||||
| -rw-r--r-- | src/test/result.py | 4 | ||||
| -rw-r--r-- | src/test/test.py | 4 |
3 files changed, 11 insertions, 4 deletions
diff --git a/src/test/captured.py b/src/test/captured.py index 4a9966d..15ef3f7 100644 --- a/src/test/captured.py +++ b/src/test/captured.py @@ -6,7 +6,7 @@ # By: charles <me@cacharle.xyz> +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2020/09/11 12:16:25 by charles #+# #+# # -# Updated: 2020/10/07 18:25:05 by cacharle ### ########.fr # +# Updated: 2020/10/11 08:44:36 by cacharle ### ########.fr # # # # ############################################################################ # @@ -21,8 +21,13 @@ class Captured: files_content: content of the files altered by the command is_timeout: the command has timed out """ + # if config.PROMPT_OBJECT is not None: + # output = output.replace(config.PROMPT_OBJECT + "\n", "") + # output = output.replace(config.PROMPT_OBJECT, "") lines = output.split('\n') for i, l in enumerate(lines): + # if l.find(config.PROMPT_OBJECT) == 0: + # l.replace(config.PROMPT_OBJECT, "") if l.find(config.REFERENCE_ERROR_BEGIN) == 0: lines[i] = l.replace(config.REFERENCE_ERROR_BEGIN, config.MINISHELL_ERROR_BEGIN, 1) elif l.find(config.REFERENCE_PATH + ": ") == 0: diff --git a/src/test/result.py b/src/test/result.py index 55cda54..e651e49 100644 --- a/src/test/result.py +++ b/src/test/result.py @@ -6,7 +6,7 @@ # By: charles <me@cacharle.xyz> +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2020/09/11 12:17:34 by charles #+# #+# # -# Updated: 2020/10/09 11:04:16 by cacharle ### ########.fr # +# Updated: 2020/10/11 14:09:24 by cacharle ### ########.fr # # # # ############################################################################ # @@ -98,7 +98,7 @@ class Result: elif config.VERBOSE_LEVEL == 2: return self.full_diff() else: - raise RuntimeError + raise RuntimeError("Invalid verbose level") def put(self, index: int): """Print a summary of the result""" diff --git a/src/test/test.py b/src/test/test.py index b487f10..238ba66 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/09 11:00:57 by cacharle ### ########.fr # +# Updated: 2020/10/11 14:09:04 by cacharle ### ########.fr # # # # ############################################################################ # @@ -61,6 +61,8 @@ class Test: self.hook = [] self.hook_status = [] captured = self._run_sandboxed([*config.VALGRIND_CMD, "-c"]) + if config.VERBOSE_LEVEL == 2: + print(captured.output) self.result = Result.leak(self.full_cmd, captured.output) self.result.put(index) return |
