File tree Expand file tree Collapse file tree 1 file changed +18
-7
lines changed Expand file tree Collapse file tree 1 file changed +18
-7
lines changed Original file line number Diff line number Diff line change 1
- #! /bin/sh
1
+ #! /bin/bash
2
2
set -e
3
3
4
+ ALL_SECTIONS=(methods modules)
5
+
4
6
GREEN=' [32m'
5
7
BOLD=' [1m'
6
8
NC=' (B[m'
@@ -23,10 +25,19 @@ cd "$(dirname "$0")"
23
25
# run whats_left_to_implement
24
26
cargo build
25
27
26
- whats_left_section () {
27
- h " $1 "
28
- cargo run -q -- tests/snippets/whats_left_" $1 " .py
29
- }
28
+ if [ $# -eq 0 ]; then
29
+ sections=(${ALL_SECTIONS[@]} )
30
+ else
31
+ sections=($@ )
32
+ fi
30
33
31
- whats_left_section methods
32
- whats_left_section modules
34
+ for section in " ${sections[@]} " ; do
35
+ section=$( echo " $section " | tr " [:upper:]" " [:lower:]" )
36
+ snippet=tests/snippets/whats_left_$section .py
37
+ if ! [[ -f $snippet ]]; then
38
+ echo " Invalid section $section " >&2
39
+ continue
40
+ fi
41
+ h " $section " >&2
42
+ cargo run -q -- " $snippet "
43
+ done
You can’t perform that action at this time.
0 commit comments