diff options
| author | Louis Burda <quent.burda@gmail.com> | 2021-05-23 19:00:18 +0200 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2021-05-23 19:00:18 +0200 |
| commit | ddf5c236446767b60718b7254a4e4d3c5e4c941c (patch) | |
| tree | 92a5d4aa322547c54dc5f06d5a78b2a8bb765695 /service/tests/test.sh | |
| parent | f75abdd928302e8ef555e1f10b19b6105609775e (diff) | |
| download | enowars5-service-stldoctor-ddf5c236446767b60718b7254a4e4d3c5e4c941c.tar.gz enowars5-service-stldoctor-ddf5c236446767b60718b7254a4e4d3c5e4c941c.zip | |
added test command for upload custom file, various smaller changes, fixed float little-endian loading
Diffstat (limited to 'service/tests/test.sh')
| -rw-r--r-- | service/tests/test.sh | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/service/tests/test.sh b/service/tests/test.sh index 19d23ff..a4b1884 100644 --- a/service/tests/test.sh +++ b/service/tests/test.sh @@ -13,7 +13,11 @@ export ECHO_INPUT=1 SCRIPTPATH="$(dirname $(readlink -f "$0"))" TESTDATA="$SCRIPTPATH/data" -cd "$SRCDIR" +shopt -s expand_aliases +alias pushd="pushd &>/dev/null" +alias popd="popd &>/dev/null" + +pushd "$SRCDIR" announce() { count=$(echo "$1" | wc -c) @@ -52,7 +56,7 @@ cleanuploads() { mkdir -p "$RESULTDIR" } -if [ "$1" == "stl" ]; then +if [ "$1" == "stl-leaks" ]; then cleanuploads announce "Testing ASCII STL Parsing" @@ -73,6 +77,26 @@ if [ "$1" == "stl" ]; then echo "BIN-testname" ) | checkleaks +elif [ "$1" == "stl-upload" ]; then + cleanuploads + + popd + file="$(realpath $2)" + if [ ! -e "$file" ]; then + echo "Supply a file to upload" + exit 1 + fi + pushd "$SRCDIR" + + name="${3:-samplefile}" + ( + echo "echo" + echo "upload" + cat "$file" | wc -c + cat "$file" + echo "$name" + ) | checkleaks + elif [ "$1" == "vuln1" ]; then cleanuploads @@ -149,7 +173,7 @@ elif [ "$1" == "vuln2" ]; then echo "exit" ) | connect -elif [ "$1" == "authupload" ]; then +elif [ "$1" == "auth-upload" ]; then cleanuploads ( @@ -172,3 +196,5 @@ elif [ "$1" == "authupload" ]; then else connect fi + +popd |
