diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2011-11-21 20:15:32 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2011-11-21 20:17:07 +0100 |
commit | e092418d8b360aaaf8c7eba67956010f4e363121 (patch) | |
tree | 1fc78a3b939434be3aa9014c68df3efc2b3238df /test | |
parent | e33e3045c6d3a4e6a8489074548e392e4f748615 (diff) |
Simplify simplify_title
Diffstat (limited to 'test')
-rw-r--r-- | test/test_div.py | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/test/test_div.py b/test/test_div.py index 367780ed3..4525c8be6 100644 --- a/test/test_div.py +++ b/test/test_div.py @@ -8,14 +8,21 @@ sys.path.append(os.path.dirname(os.path.dirname(__file__))) import youtube_dl def test_simplify_title(): - assert youtube_dl._simplify_title('abc') == 'abc' - assert youtube_dl._simplify_title('abc_d-e') == 'abc_d-e' + assert youtube_dl._simplify_title(u'abc') == u'abc' + assert youtube_dl._simplify_title(u'abc_d-e') == u'abc_d-e' - assert '/' not in youtube_dl._simplify_title('abc/de') - assert 'abc' in youtube_dl._simplify_title('abc/de') - assert 'de' in youtube_dl._simplify_title('abc/de') + assert youtube_dl._simplify_title(u'123') == u'123' - assert '\\' not in youtube_dl._simplify_title('abc\\de') - assert 'abc' in youtube_dl._simplify_title('abc\\de') - assert 'de' in youtube_dl._simplify_title('abc\\de') + assert u'/' not in youtube_dl._simplify_title(u'abc/de') + assert u'abc' in youtube_dl._simplify_title(u'abc/de') + assert u'de' in youtube_dl._simplify_title(u'abc/de') + assert u'\\' not in youtube_dl._simplify_title(u'abc\\de') + assert u'abc' in youtube_dl._simplify_title(u'abc\\de') + assert u'de' in youtube_dl._simplify_title(u'abc\\de') + + # TODO: Fix #220 + #assert youtube_dl._simplify_title(u'ä') == u'ä' + + # Strip underlines + assert youtube_dl._simplify_title(u'\'a_') == u'a' |