Skip to content

Commit

Permalink
Update test code to check both python2 and python3
Browse files Browse the repository at this point in the history
  • Loading branch information
stgraber committed Jun 13, 2012
1 parent 15ddbaa commit 1e12dd7
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions test.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
#!/bin/sh
teststring="blah blah blah"

for pastebin in $(./pastebinit -l | egrep "^-" | sed "s/^- //g")
for interpreter in python python3
do
echo "Trying http://$pastebin"
URL=$(echo -e "$teststring\n$teststring\n$teststring" | ./pastebinit -b http://$pastebin)
out=$(wget -O - -q "$URL" | grep "$teststring")
if [ -n "$out" ]; then
echo "PASS: http://$pastebin ($URL)"
else
echo "FAIL: http://$pastebin ($URL)"
fi
for pastebin in $(./pastebinit -l | egrep "^-" | sed "s/^- //g")
do
echo "Trying http://$pastebin ($interpreter)"
URL=$(echo -e "$teststring\n$teststring\n$teststring" | $interpreter pastebinit -b http://$pastebin)
out=$(wget -O - -q "$URL" | grep "$teststring")
if [ -n "$out" ]; then
echo "PASS: http://$pastebin ($URL) ($interpreter)"
else
echo "FAIL: http://$pastebin ($URL) ($interpreter)"
fi
echo ""
done
done

0 comments on commit 1e12dd7

Please sign in to comment.