Skip to content

Commit e42d97c

Browse files
committed
Format codes
1 parent fb47859 commit e42d97c

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

.github/workflows/test-expand.sh

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22

33
TEST_MODULES=(convolution dsu fenwicktree lazysegtree math maxflow mincostflow modint scc segtree string twosat --all)
44
TMP_PATH=$(mktemp -d)
5-
SCRIPT_DIR=$(cd $(dirname $0); pwd)
5+
# shellcheck disable=SC2164
6+
SCRIPT_DIR="$(cd "$(dirname "$0")"; pwd)"
67
TEST_FILE="test.rs"
78
FILE_HEAD="fn main() {}"
89

9-
for MODULE in ${TEST_MODULES[@]};do
10-
echo Test module $MODULE
11-
python3 $SCRIPT_DIR/../../expand.py $MODULE > $TMP_PATH/$TEST_FILE
12-
echo "Output" $(wc -c < $TMP_PATH/$TEST_FILE) "Bytes"
13-
echo $FILE_HEAD >> $TMP_PATH/$TEST_FILE
14-
rustc -A warnings $TMP_PATH/$TEST_FILE
15-
if [ $? -ne 0 ];then
10+
for MODULE in "${TEST_MODULES[@]}" ;do
11+
echo "Test module $MODULE"
12+
python3 "$SCRIPT_DIR/../../expand.py" "$MODULE" > "$TMP_PATH/$TEST_FILE"
13+
echo Output "$(wc -c < "$TMP_PATH/$TEST_FILE")" Bytes
14+
echo "$FILE_HEAD" >> "$TMP_PATH/$TEST_FILE"
15+
if ! rustc -A warnings "$TMP_PATH/$TEST_FILE";
16+
then
1617
echo "Error compiling for $MODULE"
1718
exit 1
1819
else

0 commit comments

Comments
 (0)