Skip to content

Commit 2e036ca

Browse files
committed
Added -a --all options
1 parent e9e290b commit 2e036ca

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.github/workflows/test-expand.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
TEST_MODULES=(convolution dsu fenwicktree lazysegtree math maxflow mincostflow modint scc segtree string twosat)
3+
TEST_MODULES=(convolution dsu fenwicktree lazysegtree math maxflow mincostflow modint scc segtree string twosat --all)
44
TMP_PATH=$(mktemp -d)
55
SCRIPT_DIR=$(cd $(dirname $0); pwd)
66
TEST_FILE="test.rs"

expand.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@
2222
e.g.)expand.py math segtree
2323
2424
Options:
25-
-h --help print help
25+
-a --all import all modules
26+
-h --help print help
2627
'''
2728
output_header = '//https://github.com/rust-lang-ja/ac-library-rs\n'
28-
opt_list = ['help']
29+
opt_list = ['help', 'all']
2930
output_list_all = ('lazysegtree', 'segtree', 'convolution', 'twosat', 'scc',
3031
'fenwicktree', 'math', 'modint', 'maxflow', 'dsu', 'mincostflow', 'string', 'internal_bit', 'internal_math', 'internal_type_traits', 'internal_scc', 'internal_queue')
3132
dependency_list = {'lazysegtree': ('internal_bit',), 'segtree': ('internal_bit',), 'convolution': ('internal_bit', 'modint',), 'math': ('internal_math',), 'modint': (
@@ -48,7 +49,7 @@ def output_file(filename):
4849

4950

5051
try:
51-
opts, args = getopt.getopt(sys.argv[1:], 'h', opt_list)
52+
opts, args = getopt.getopt(sys.argv[1:], 'ah', opt_list)
5253
except getopt.GetoptError as e:
5354
print(e)
5455
print(usage)
@@ -58,6 +59,8 @@ def output_file(filename):
5859
if o == '--help' or o == '-h':
5960
print(usage)
6061
sys.exit(0)
62+
elif o == '--all' or o == '-a':
63+
args = list(output_list_all)
6164

6265
output_list = set()
6366

0 commit comments

Comments
 (0)