mirror of
https://github.com/mpv-player/mpv
synced 2024-12-25 00:02:13 +00:00
test: test mp_guess_lang_from_filename with [] and ()
This commit is contained in:
parent
d79aef1425
commit
1f69659a77
@ -76,5 +76,13 @@ int main(void)
|
||||
assert_string_equal(bstrto0(ta_ctx, mp_guess_lang_from_filename(bstr0("foo.en-aaaaaaaaa.srt"), NULL)), "");
|
||||
assert_string_equal(bstrto0(ta_ctx, mp_guess_lang_from_filename(bstr0("foo.en-0.srt"), NULL)), "");
|
||||
|
||||
assert_string_equal(bstrto0(ta_ctx, mp_guess_lang_from_filename(bstr0("foo[en].srt"), NULL)), "en");
|
||||
assert_string_equal(bstrto0(ta_ctx, mp_guess_lang_from_filename(bstr0("foo[en-US].srt"), NULL)), "en-US");
|
||||
assert_string_equal(bstrto0(ta_ctx, mp_guess_lang_from_filename(bstr0("foo[].srt"), NULL)), "");
|
||||
|
||||
assert_string_equal(bstrto0(ta_ctx, mp_guess_lang_from_filename(bstr0("foo(en).srt"), NULL)), "en");
|
||||
assert_string_equal(bstrto0(ta_ctx, mp_guess_lang_from_filename(bstr0("foo(en-US).srt"), NULL)), "en-US");
|
||||
assert_string_equal(bstrto0(ta_ctx, mp_guess_lang_from_filename(bstr0("foo().srt"), NULL)), "");
|
||||
|
||||
talloc_free(ta_ctx);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user