Shorten URLs service / Makefile

.PHONY: test test-flickr test-youtube test-techcrunch test-arstechnica test-amazon test-amazon-wishlist test-tmo

test: test-flickr test-youtube test-techcrunch test-arstechnica test-amazon test-amazon-wishlist test-tmo
test-flickr:
	echo -n > flickr.out
	echo -n > flickr.out.correct
	echo 'http://www.flickr.com/photos/apelad/4314506957/' | ./Shorten-URLs.py >> flickr.out
	echo 'http://flic.kr/p/7zfYAZ' >> flickr.out.correct
	echo 'http://flickr.com/photos/apelad/4314506957/' | ./Shorten-URLs.py >> flickr.out
	echo 'http://flic.kr/p/7zfYAZ' >> flickr.out.correct
	echo 'flickr.com/photos/apelad/4314506957/' | ./Shorten-URLs.py >> flickr.out
	echo 'http://flic.kr/p/7zfYAZ' >> flickr.out.correct
	echo 'http://www.flickr.com/photos/apelad/4314506957/in/set-72157594231349587/' | ./Shorten-URLs.py >> flickr.out
	echo 'http://flic.kr/p/7zfYAZ' >> flickr.out.correct
	echo 'http://flickr.com/photos/apelad/4314506957/in/set-72157594231349587/' | ./Shorten-URLs.py >> flickr.out
	echo 'http://flic.kr/p/7zfYAZ' >> flickr.out.correct
	echo 'flickr.com/photos/apelad/4314506957/in/set-72157594231349587/' | ./Shorten-URLs.py >> flickr.out
	echo 'http://flic.kr/p/7zfYAZ' >> flickr.out.correct
	diff -u flickr.out.correct flickr.out

test-youtube:
	echo -n > youtube.out
	echo -n > youtube.out.correct
	echo 'http://www.youtube.com/watch?v=1c5qpAH8YKo' | ./Shorten-URLs.py >> youtube.out
	echo 'http://youtu.be/1c5qpAH8YKo' >> youtube.out.correct
	echo 'http://youtube.com/watch?v=1c5qpAH8YKo' | ./Shorten-URLs.py  >> youtube.out
	echo 'http://youtu.be/1c5qpAH8YKo' >> youtube.out.correct
	echo 'youtube.com/watch?v=1c5qpAH8YKo' | ./Shorten-URLs.py >> youtube.out
	echo 'http://youtu.be/1c5qpAH8YKo' >> youtube.out.correct
	echo 'http://www.youtube.com/watch?v=DtkoAlwIpWY&feature=youtu.be' | ./Shorten-URLs.py >> youtube.out
	echo 'http://youtu.be/DtkoAlwIpWY' >> youtube.out.correct
	diff -u youtube.out.correct youtube.out

test-techcrunch:
	echo -n > techcrunch.out
	echo -n > techcrunch.out.correct
	echo 'http://www.techcrunch.com/2010/01/30/ipad-v-a-rock' | ./Shorten-URLs.py >> techcrunch.out
	echo 'http://tcrn.ch/c9s4Pq' >> techcrunch.out.correct
	echo 'http://techcrunch.com/2010/01/30/ipad-v-a-rock' | ./Shorten-URLs.py >> techcrunch.out
	echo 'http://tcrn.ch/c9s4Pq' >> techcrunch.out.correct
	echo 'techcrunch.com/2010/01/30/ipad-v-a-rock' | ./Shorten-URLs.py >> techcrunch.out
	echo 'http://tcrn.ch/c9s4Pq' >> techcrunch.out.correct
	diff -u techcrunch.out.correct techcrunch.out

test-arstechnica:
	echo -n > arstechnica.out
	echo -n > arstechnica.out.correct
	echo 'http://www.arstechnica.com/apple/news/2010/01/photo-gallery-hands-on-with-the-ipad-and-live-event.ars' | ./Shorten-URLs.py >> arstechnica.out
	echo 'http://arst.ch/dc4' >> arstechnica.out.correct
	echo 'http://arstechnica.com/apple/news/2010/01/photo-gallery-hands-on-with-the-ipad-and-live-event.ars' | ./Shorten-URLs.py >> arstechnica.out
	echo 'http://arst.ch/dc4' >> arstechnica.out.correct
	echo 'arstechnica.com/apple/news/2010/01/photo-gallery-hands-on-with-the-ipad-and-live-event.ars' | ./Shorten-URLs.py >> arstechnica.out
	echo 'http://arst.ch/dc4' >> arstechnica.out.correct
	diff -u arstechnica.out.correct arstechnica.out

test-amazon:
	echo -n > amazon.out
	echo -n > amazon.out.correct
	echo 'http://www.amazon.com/gp/product/B002BAX76G/ref=sr_1_album_1_rd?ie=UTF8&child=B002BB2X6K&qid=1264852235&sr=1-1' | ./Shorten-URLs.py >> amazon.out
	echo 'http://amzn.com/B002BAX76G' >> amazon.out.correct
	echo 'http://www.amazon.com/Song-Up-In-Her-Head/dp/B002BAX76G' | ./Shorten-URLs.py >> amazon.out
	echo 'http://amzn.com/B002BAX76G' >> amazon.out.correct
	echo 'http://www.amazon.com/dp/B002BAX76G/ref=cm_sw_su_dp' | ./Shorten-URLs.py >> amazon.out
	echo 'http://amzn.com/B002BAX76G' >> amazon.out.correct
	echo 'http://amazon.com/gp/product/B002BAX76G/ref=sr_1_album_1_rd?ie=UTF8&child=B002BB2X6K&qid=1264852235&sr=1-1' | ./Shorten-URLs.py >> amazon.out
	echo 'http://amzn.com/B002BAX76G' >> amazon.out.correct
	echo 'http://amazon.com/Song-Up-In-Her-Head/dp/B002BAX76G' | ./Shorten-URLs.py >> amazon.out
	echo 'http://amzn.com/B002BAX76G' >> amazon.out.correct
	echo 'http://amazon.com/dp/B002BAX76G/ref=cm_sw_su_dp' | ./Shorten-URLs.py >> amazon.out
	echo 'http://amzn.com/B002BAX76G' >> amazon.out.correct
	echo 'amazon.com/gp/product/B002BAX76G/ref=sr_1_album_1_rd?ie=UTF8&child=B002BB2X6K&qid=1264852235&sr=1-1' | ./Shorten-URLs.py >> amazon.out
	echo 'http://amzn.com/B002BAX76G' >> amazon.out.correct
	echo 'amazon.com/Song-Up-In-Her-Head/dp/B002BAX76G' | ./Shorten-URLs.py >> amazon.out
	echo 'http://amzn.com/B002BAX76G' >> amazon.out.correct
	echo 'amazon.com/dp/B002BAX76G/ref=cm_sw_su_dp' | ./Shorten-URLs.py >> amazon.out
	echo 'http://amzn.com/B002BAX76G' >> amazon.out.correct
	echo 'http://www.amazon.com/Primer-Graphics-Development-Wordware-Library/dp/1556229119/ref=sr_1_1?ie=UTF8&s=books&qid=1303216717&sr=8-1' | ./Shorten-URLs.py >> amazon.out
	echo 'http://amzn.com/1556229119' >> amazon.out.correct
	echo 'http://www.amazon.com/Planets-Op-32-Bringer-Allegro/dp/album-redirect/B0013D9YB4/ref=sr_1_album_1?ie=UTF8&s=dmusic&qid=1311514320&sr=1-1' | ./Shorten-URLs.py >> amazon.out
	echo 'http://amzn.com/B0013D9YB4' >> amazon.out.correct
	echo '((http://www.amazon.com/gp/product/B005GMR9LK/ref=kinw_myk_ro_title))' | ./Shorten-URLs.py >> amazon.out
	echo '((http://amzn.com/B005GMR9LK))' >> amazon.out.correct
	echo '((http://www.amazon.com/Java-Bibliography-ebook/dp/B005GMR9LA/ref=sr_1_1?s=digital-text&ie=UTF8&qid=1336400865&sr=1-1))' | ./Shorten-URLs.py >> amazon.out
	echo '((http://amzn.com/B005GMR9LA))' >> amazon.out.correct
	diff -u amazon.out.correct amazon.out

test-amazon-wishlist:
	echo -n > amazon-wishlist.out
	echo -n > amazon-wishlist.out.correct
	echo 'http://www.amazon.com/gp/registry/wishlist/2ZB9JVV1S28HJ' | ./Shorten-URLs.py >> amazon-wishlist.out
	echo 'http://amzn.com/w/2ZB9JVV1S28HJ' >> amazon-wishlist.out.correct
	echo 'http://www.amazon.com/registry/wishlist/2ZB9JVV1S28HJ/ref=cm_wl_act_vv?_encoding=UTF8&visitor-view=1&reveal=' | ./Shorten-URLs.py >> amazon-wishlist.out
	echo 'http://amzn.com/w/2ZB9JVV1S28HJ' >> amazon-wishlist.out.correct
	diff -u amazon-wishlist.out.correct amazon-wishlist.out

test-tmo:
	echo -n > tmo.out
	echo -n > tmo.out.correct
	echo 'http://www.macobserver.com/tmo/article/hairersoft_releases_amadeus_pro_1.4/' | ./Shorten-URLs.py >> tmo.out
	echo 'http://tmo.to/e3pK' >> tmo.out.correct
	echo 'http://www.macobserver.com/tmo/article/hairersoft_releases_amadeus_pro_1.4' | ./Shorten-URLs.py >> tmo.out
	echo 'http://tmo.to/e3pK' >> tmo.out.correct
	echo 'http://macobserver.com/tmo/article/hairersoft_releases_amadeus_pro_1.4/' | ./Shorten-URLs.py >> tmo.out
	echo 'http://tmo.to/e3pK' >> tmo.out.correct
	echo 'http://macobserver.com/tmo/article/hairersoft_releases_amadeus_pro_1.4' | ./Shorten-URLs.py >> tmo.out
	echo 'http://tmo.to/e3pK' >> tmo.out.correct
	diff -u tmo.out.correct tmo.out

test-tumblr:
	echo -n > tumblr.out
	echo -n > tumblr.out.correct
	echo 'http://essentialsoftheinternet.tumblr.com/post/7935646279/pocket-ref' | ./Shorten-URLs.py >> tumblr.out
	echo 'http://tumblr.com/xtc3n8ofuv' >> tumblr.out.correct
	echo 'http://essentialsoftheinternet.tumblr.com/post/7935646279/' | ./Shorten-URLs.py >> tumblr.out
	echo 'http://tumblr.com/xtc3n8ofuv' >> tumblr.out.correct
	echo 'http://essentialsoftheinternet.tumblr.com/post/7935646279' | ./Shorten-URLs.py >> tumblr.out
	echo 'http://tumblr.com/xtc3n8ofuv' >> tumblr.out.correct
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.