Skip to content

Commit

Permalink
additional test
Browse files Browse the repository at this point in the history
  • Loading branch information
gwirn committed Aug 24, 2023
1 parent 5dd5a82 commit c69e3dd
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,17 @@ if [[ ! $(cat ../testFiles/testFile1.txt | go run main.go line | grep line | wc
else
echo "PASS: Pattern matching for input from StdIn "
fi

if [[ ! $(go run main.go wold ../testFiles/* | grep world | wc -l) -eq 6 ]];then
echo "FAILED: Reduced 'world' -> 'wold'"
exit 1
else
echo "PASS: Reduced 'world' -> 'wold'"
fi

if [[ ! $(go run main.go wod ../testFiles/* | grep world | wc -l) -eq 0 && ! $(go run main.go wod ../testFiles/* | wc -l) -eq 0 ]];then
echo "FAILED: Reduced 'world' -> 'wold'"
exit 1
else
echo "PASS: Reduced 'world' -> 'wod'"
fi

0 comments on commit c69e3dd

Please sign in to comment.