mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-07-31 08:33:23 +08:00
19 lines
549 B
Bash
Executable File
19 lines
549 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -eu
|
|
|
|
# Runs the test which is marked with solo
|
|
|
|
FILENAME=$(grep -rn solo test/* | awk -F ':' '{ print $1 }')
|
|
LINE_NUM=$(grep -rn solo test/* | awk -F ':' '{ print $2 }')
|
|
|
|
FUNC_NAME=""
|
|
while [[ -z $FUNC_NAME ]]; do
|
|
LINE_NUM=$((LINE_NUM - 1))
|
|
LINE=$(sed -n ${LINE_NUM}p test/autocompletion/tags_test.dart)
|
|
FUNC_NAME=$(echo "$LINE" | sed -n -E "s#test\([\"'](.+)[\"'].*#\1#p" | xargs)
|
|
done
|
|
|
|
echo flutter test --name "$FUNC_NAME" "$FILENAME"
|
|
find . -name '*.dart' | entr flutter test --name "$FUNC_NAME" "$FILENAME"
|