aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/test_div.py
blob: 367780ed3a9e391e0838b46a1043d5693f869dda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# -*- coding: utf-8 -*-

# Various small unit tests

import os,sys
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 '/' 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 '\\' 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')