Skip to content

Commit

Permalink
add tests.test_common
Browse files Browse the repository at this point in the history
  • Loading branch information
soimort committed Jul 11, 2013
1 parent 72df45b commit c4db743
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_common.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env python

import unittest

from you_get import *

class TestCommon(unittest.TestCase):

def test_match1(self):
self.assertEqual(match1('http://youtu.be/1234567890A', r'youtu.be/([^/]+)'), '1234567890A')
self.assertEqual(match1('http://youtu.be/1234567890A', r'youtu.be/([^/]+)', r'youtu.(\w+)'), ['1234567890A', 'be'])

0 comments on commit c4db743

Please sign in to comment.