aboutsummaryrefslogtreecommitdiff
path: root/src/args.py
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-10-11 15:38:53 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-10-11 15:38:53 +0200
commita36a27b8ca85adf57b2a9926a53e74e3a3863d3d (patch)
tree0cef6594264f1ebe2252f975514849c9a1262922 /src/args.py
parentfb0a727a9885b80b855f470ae6d5c1bfac614439 (diff)
downloadminishell_test-a36a27b8ca85adf57b2a9926a53e74e3a3863d3d.tar.gz
minishell_test-a36a27b8ca85adf57b2a9926a53e74e3a3863d3d.tar.bz2
minishell_test-a36a27b8ca85adf57b2a9926a53e74e3a3863d3d.zip
Added leak verbose
Diffstat (limited to 'src/args.py')
-rw-r--r--src/args.py20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/args.py b/src/args.py
index 5473711..289083b 100644
--- a/src/args.py
+++ b/src/args.py
@@ -6,7 +6,7 @@
# By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/07/15 18:24:32 by charles #+# #+# #
-# Updated: 2020/10/09 10:58:47 by cacharle ### ########.fr #
+# Updated: 2020/10/10 14:26:20 by cacharle ### ########.fr #
# #
# ############################################################################ #
@@ -18,7 +18,7 @@ def parse_args():
"""Parse command line arguments"""
parser = argparse.ArgumentParser(
- description=textwrap.dedent(r"""\
+ description=textwrap.dedent("""\
___ ____ _ _ _ _ _ _
| \/ (_) (_) | | | | | | | | |
| . . |_ _ __ _ ___| |__ ___| | | | |_ ___ ___| |_
@@ -38,8 +38,14 @@ def parse_args():
help="Run valgrind on tests (disable usual comparison with bash)"
)
parser.add_argument(
- "-x", "--exit-first", action="store_true",
- help="Exit on first fail"
+ "-p", "--prompt",
+ help=textwrap.dedent("""\
+ The format of your prompt, the available format are:
+ - abs_path: absolute path to the current directory
+ - base_path: last directory of the path to the current directory
+ - username: current user
+ You can also the the environment variable MINISHELL_TEST_PROMPT.
+ """)
)
parser.add_argument(
"-r", "--range", nargs=2, type=int, metavar=("BEGIN", "END"),
@@ -50,6 +56,10 @@ def parse_args():
help="Show test index (useful with --range)"
)
parser.add_argument(
+ "-x", "--exit-first", action="store_true",
+ help="Exit on first fail"
+ )
+ parser.add_argument(
"-v", "--verbose", action="count",
help="Increase verbosity level (e.g -vv == 2)"
)
@@ -70,7 +80,7 @@ def parse_args():
help="Make minishell and exit"
)
parser.add_argument(
- "-p", "--pager", action="store_true",
+ "-g", "--pager", action="store_true",
help="After running the test, display the result in a pager of your choice"
)
parser.add_argument(