implementations.yarn (954B)
1 IMPLEMENTS GIVEN a sparse file ([a-zA-Z]+) with a hole size ([0-9]+) and data size ([0-9]+) with spec ([a-zA-z,]+) 2 set -e -o pipefail 3 echo "$MATCH_4" | mksparse "$DATADIR/$MATCH_1" --hole-size "$MATCH_2" --data-size "$MATCH_3" 4 5 IMPLEMENTS WHEN we run sparsemap on ([a-zA-Z]+) 6 run_sparsemap "$DATADIR/$MATCH_1" 7 8 IMPLEMENTS WHEN we attempt to run ([a-zA-Z]+) without any arguments 9 set +e 10 eval run_$MATCH_1 11 echo $? > "$DATADIR/EXITCODE" 12 set -e 13 14 IMPLEMENTS WHEN we attempt to run ([a-zA-Z]+) (on|with) (.+) 15 set +e 16 eval run_$MATCH_1 "$DATADIR/$MATCH_3" 17 echo $? > "$DATADIR/EXITCODE" 18 set -e 19 20 IMPLEMENTS THEN the exit code is ([0-9]+) 21 exit_code=$(cat "$DATADIR/EXITCODE") 22 [[ $exit_code -eq $MATCH_1 ]] 23 24 IMPLEMENTS THEN stderr contains '(.+)' 25 grep -i "$MATCH_1" "$DATADIR/STDERR" 26 27 IMPLEMENTS THEN stdout contains exactly (.+) 28 diff -u <(echo -e "$MATCH_1") "$DATADIR/STDOUT"