Skip to content

Commit

Permalink
Add test.sh, script to test all supported pastebins automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
stgraber committed Jan 30, 2011
1 parent 7ab6611 commit 653e1bc
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh
teststring="blah blah blah"

for pastebin in $(./pastebinit -l | egrep "^-" | sed "s/^- //g")
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
done

0 comments on commit 653e1bc

Please sign in to comment.