aboutsummaryrefslogtreecommitdiff
path: root/minishell_test/args.py
diff options
context:
space:
mode:
Diffstat (limited to 'minishell_test/args.py')
-rw-r--r--minishell_test/args.py23
1 files changed, 10 insertions, 13 deletions
diff --git a/minishell_test/args.py b/minishell_test/args.py
index b7fcca6..3dd124f 100644
--- a/minishell_test/args.py
+++ b/minishell_test/args.py
@@ -6,31 +6,24 @@
# By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/07/15 18:24:32 by charles #+# #+# #
-# Updated: 2021/01/11 22:20:16 by charles ### ########.fr #
+# Updated: 2021/02/05 20:38:28 by charles ### ########.fr #
# #
# ############################################################################ #
import argparse
import textwrap
+import minishell_test.config as config
+
def parse_args():
"""Parse command line arguments"""
parser = argparse.ArgumentParser(
- description=textwrap.dedent(r"""
- ___ ____ _ _ _ _ _ _
- | \/ (_) (_) | | | | | | | | |
- | . . |_ _ __ _ ___| |__ ___| | | | |_ ___ ___| |_
- | |\/| | | '_ \| / __| '_ \ / _ \ | | | __/ _ \/ __| __|
- | | | | | | | | \__ \ | | | __/ | | | || __/\__ \ |_
- \_| |_/_|_| |_|_|___/_| |_|\___|_|_| \__\___||___/\__|
- """),
+ description="Test for the minishell project of school 42.",
formatter_class=argparse.RawTextHelpFormatter,
- epilog=textwrap.dedent("""\
- Signal handling is not tested
- There is a commented glob suite in src/suites/preprocess.py.
- Good luck handling `*'.*'`.
+ epilog=textwrap.dedent("""
+ Made by cacharle - https://cacharle.xyz
""")
)
parser.add_argument(
@@ -74,6 +67,10 @@ def parse_args():
help="After running the test, display the result in a pager of your choice"
)
parser.add_argument(
+ "-p", "--path", default=config.MINISHELL_DIR,
+ help="Path to minishell directory"
+ )
+ parser.add_argument(
"suites", nargs='*', metavar="suite",
help=textwrap.dedent("""\
Test suites/group to run.