diff options
author | Camil Staps | 2017-11-22 09:58:14 +0100 |
---|---|---|
committer | Camil Staps | 2017-11-22 09:58:14 +0100 |
commit | 7644d57ce32264f35175518ed848b39cb0a62f0d (patch) | |
tree | 139162303642e3fedb7e434bddece9ae834808be /test.sh | |
parent | Add parser (diff) |
Test setup
Diffstat (limited to 'test.sh')
-rwxr-xr-x | test.sh | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -0,0 +1,14 @@ +#!/bin/bash + +SUCCESS=true +while IFS=$'\t' read -r req res; do + outcome="$(./pf -nt "$req" | grep Result | cut -d' ' -f3-)" + if [ "$res" != "$outcome" ]; then + echo "Test failed: $req" + echo "Expected result: $res" + echo "Actual result: $outcome" + SUCCESS=false + fi +done < "test.tsv" + +$SUCCESS && echo "All tests passed." |