Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Allow specifying sections for whats_left.sh
  • Loading branch information
coolreader18 committed Jul 1, 2019
commit 92625857ba54ab2e0d23cb9e7a78884f9c774863
25 changes: 18 additions & 7 deletions whats_left.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/sh
#!/bin/bash
set -e

ALL_SECTIONS=(methods modules)

GREEN=''
BOLD=''
NC='(B'
Expand All @@ -23,10 +25,19 @@ cd "$(dirname "$0")"
# run whats_left_to_implement
cargo build

whats_left_section() {
h "$1"
cargo run -q -- tests/snippets/whats_left_"$1".py
}
if [ $# -eq 0 ]; then
sections=(${ALL_SECTIONS[@]})
else
sections=($@)
fi

whats_left_section methods
whats_left_section modules
for section in "${sections[@]}"; do
section=$(echo "$section" | tr "[:upper:]" "[:lower:]")
snippet=tests/snippets/whats_left_$section.py
if ! [[ -f $snippet ]]; then
echo "Invalid section $section" >&2
continue
fi
h "$section" >&2
cargo run -q -- "$snippet"
done