aboutsummaryrefslogtreecommitdiff
path: root/src/args.py
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-10-09 11:19:58 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-10-09 11:19:58 +0200
commit84b23010e0d0515ad3ed17a605440e50439781e8 (patch)
tree2c71f2d4afbb7b0a8e9e128f1d1383f5637de88c /src/args.py
parent5d1410a9b08eb8df82a43312b8b6d3d9c1c9eb00 (diff)
downloadminishell_test-84b23010e0d0515ad3ed17a605440e50439781e8.tar.gz
minishell_test-84b23010e0d0515ad3ed17a605440e50439781e8.tar.bz2
minishell_test-84b23010e0d0515ad3ed17a605440e50439781e8.zip
Formatting/Refactoring, Added pretty ascii art
Diffstat (limited to 'src/args.py')
-rw-r--r--src/args.py27
1 files changed, 21 insertions, 6 deletions
diff --git a/src/args.py b/src/args.py
index 7d1f260..5473711 100644
--- a/src/args.py
+++ b/src/args.py
@@ -6,19 +6,32 @@
# By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/07/15 18:24:32 by charles #+# #+# #
-# Updated: 2020/10/08 16:29:25 by cacharle ### ########.fr #
+# Updated: 2020/10/09 10:58:47 by cacharle ### ########.fr #
# #
# ############################################################################ #
import argparse
+import textwrap
def parse_args():
"""Parse command line arguments"""
parser = argparse.ArgumentParser(
- description="Minishell test",
- epilog="Signal handling is not tested"
+ description=textwrap.dedent(r"""\
+ ___ ____ _ _ _ _ _ _
+ | \/ (_) (_) | | | | | | | | |
+ | . . |_ _ __ _ ___| |__ ___| | | | |_ ___ ___| |_
+ | |\/| | | '_ \| / __| '_ \ / _ \ | | | __/ _ \/ __| __|
+ | | | | | | | | \__ \ | | | __/ | | | || __/\__ \ |_
+ \_| |_/_|_| |_|_|___/_| |_|\___|_|_| \__\___||___/\__|
+ """),
+ 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 `*'.*'`.
+ """)
)
parser.add_argument(
"-k", "--check-leaks", action="store_true",
@@ -62,9 +75,11 @@ def parse_args():
)
parser.add_argument(
"suites", nargs='*', metavar="suite",
- help="Test suites/group to run. "
- "It tries to be smart and autocomplete the suite name "
- "(e.g ./run int -> ./run preprocess/interpolation)"
+ help=textwrap.dedent("""\
+ Test suites/group to run.
+ It tries to be smart and autocomplete the suite name
+ (e.g ./run int -> ./run preprocess/interpolation)
+ """)
)
tmp = parser.parse_args()
if tmp.verbose is None: