aboutsummaryrefslogtreecommitdiff
path: root/minishell_test/test/captured.py
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2021-02-27 12:24:37 +0100
committerCharles Cabergs <me@cacharle.xyz>2021-02-27 12:24:37 +0100
commit7081b93b8ed4f98c628400e05d22d0523f41a842 (patch)
tree4b945840ade4d1869ceedf94e9bca4581f096d0f /minishell_test/test/captured.py
parentad7233a4a5f45be6f991ed38a7351a6ef826356b (diff)
downloadminishell_test-7081b93b8ed4f98c628400e05d22d0523f41a842.tar.gz
minishell_test-7081b93b8ed4f98c628400e05d22d0523f41a842.tar.bz2
minishell_test-7081b93b8ed4f98c628400e05d22d0523f41a842.zip
Fixing #16 - Adding support for custom config file in user directory
Diffstat (limited to 'minishell_test/test/captured.py')
-rw-r--r--minishell_test/test/captured.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/minishell_test/test/captured.py b/minishell_test/test/captured.py
index 7db9739..a6141e8 100644
--- a/minishell_test/test/captured.py
+++ b/minishell_test/test/captured.py
@@ -6,13 +6,13 @@
# By: charles <me@cacharle.xyz> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/09/11 12:16:25 by charles #+# #+# #
-# Updated: 2021/02/05 17:47:10 by charles ### ########.fr #
+# Updated: 2021/02/27 12:20:00 by cacharle ### ########.fr #
# #
# ############################################################################ #
from typing import List, Optional
-import minishell_test.config as config
+# from minishell_test import config
class Captured:
@@ -29,13 +29,15 @@ class Captured:
files_content: content of the files altered by the command
is_timeout: the command has timed out
"""
- lines = output.split('\n')
- for i, l in enumerate(lines):
- 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:
- lines[i] = l.replace(config.REFERENCE_PATH + ": ", config.MINISHELL_ERROR_BEGIN, 1)
- self.output = '\n'.join(lines)
+
+ # lines = output.split('\n')
+ # for i, l in enumerate(lines):
+ # 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:
+ # lines[i] = l.replace(config.REFERENCE_PATH + ": ", config.MINISHELL_ERROR_BEGIN, 1)
+
+ self.output = output # '\n'.join(lines)
self.status = status
self.files_content = files_content