Skip to content

Commit

Permalink
trim whitespace from wc in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisconley committed Dec 19, 2013
1 parent dbb63f7 commit 4ec74ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/functional_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if [ $? != 0 ]; then
fi

# Test that 500 interations with 3 groups produces 1500 simulation lines
result=$(head -n 10 ./samples.csv | (../simulate 500 0.25 0.25 0.5) | wc -l | diff - <(echo "1500") 2>&1)
result=$(head -n 10 ./samples.csv | (../simulate 500 0.25 0.25 0.5) | wc -l | tr -d ' \t' | diff - <(echo "1500") 2>&1)
if [ $? != 0 ]; then
echo "---------"
echo "Expected '../simulate 500 0.25 0.25 0.5' to produce 1500 lines"
Expand All @@ -30,7 +30,7 @@ if [ $? != 0 ]; then
fi

# Test that 1000 interations with 2 groups produces 2000 simulation lines
result=$(head -n 10 ./samples.csv | (../simulate 1000 0.25 0.25) | wc -l | diff - <(echo "2000") 2>&1)
result=$(head -n 10 ./samples.csv | (../simulate 1000 0.25 0.25) | wc -l | tr -d ' \t' | diff - <(echo "2000") 2>&1)
if [ $? != 0 ]; then
echo "---------"
echo "Expected '../simulate 500 0.25 0.25' to produce 2000 lines"
Expand Down

0 comments on commit 4ec74ae

Please sign in to comment.