Skip to content

Commit

Permalink
Update Testing.md
Browse files Browse the repository at this point in the history
  • Loading branch information
caspervonb committed Jan 14, 2021
1 parent f944d5a commit 4f83b4f
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions Testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,27 @@ stdout_actual="$output/stdout"
stderr_actual="$output/stderr"
status_actual="$output/status"

if [ -e "$prefix.arg" ]; then
arg=$(cat "$prefix.env")
else
arg=""
fi

if [ -e "$prefix.env" ]; then
env=$(sed -e 's/^/--env /' < "$input.env")
env=$(sed -e 's/^/--env /' < "$prefix.env")
else
env=""
fi

if [ -e "$input.dir" ]; then
dir="--dir $input.dir"
if [ -e "$prefix.dir" ]; then
dir="--dir $prefix.dir"
else
dir=""
fi

status=0

"$runtime" $dir $input \
"$runtime" $dir $input -- $arg \
< "$stdin" \
> "$stdout_actual" \
2> "$stderr_actual" \
Expand Down Expand Up @@ -77,3 +83,4 @@ fi
```

## Writing tests

0 comments on commit 4f83b4f

Please sign in to comment.