Fix clean_filename test.
This commit is contained in:
parent
f9f309d334
commit
bb0908504b
@ -24,24 +24,24 @@ TEST(Misc, clean_filename) {
|
|||||||
test_clean_filename("!@#$%^&*()_+-=[]{;|:\"}'<>?,.`~", "!@#$%^ ()_+-=[]{; } ,.~");
|
test_clean_filename("!@#$%^&*()_+-=[]{;|:\"}'<>?,.`~", "!@#$%^ ()_+-=[]{; } ,.~");
|
||||||
test_clean_filename("!@#$%^&*()_+-=[]{}\\|:\";'<>?,.`~", "; ,.~");
|
test_clean_filename("!@#$%^&*()_+-=[]{}\\|:\";'<>?,.`~", "; ,.~");
|
||||||
test_clean_filename("عرفها بعد قد. هذا مع تاريخ اليميني واندونيسيا،, لعدم تاريخ لهيمنة الى",
|
test_clean_filename("عرفها بعد قد. هذا مع تاريخ اليميني واندونيسيا،, لعدم تاريخ لهيمنة الى",
|
||||||
"عرفها بعد قد.هذا مع تاريخ اليميني");
|
"عرفها بعد قد.هذا مع تاريخ الي");
|
||||||
test_clean_filename(
|
test_clean_filename(
|
||||||
"012345678901234567890123456789012345678901234567890123456789adsasdasdsaa.01234567890123456789asdasdasdasd",
|
"012345678901234567890123456789012345678901234567890123456789adsasdasdsaa.01234567890123456789asdasdasdasd",
|
||||||
"012345678901234567890123456789012345678901234567890123456789.01234567890123456789");
|
"012345678901234567890123456789012345678901234567890123456789adsa.0123456789012345");
|
||||||
test_clean_filename(
|
test_clean_filename(
|
||||||
"01234567890123456789012345678901234567890123456789<>*?: <>*?:0123456789adsasdasdsaa. "
|
"01234567890123456789012345678901234567890123456789adsa<>*?: <>*?:0123456789adsasdasdsaa. "
|
||||||
"0123456789`<><<>><><>0123456789asdasdasdasd",
|
"0123456789`<><<>><><>0123456789asdasdasdasd",
|
||||||
"01234567890123456789012345678901234567890123456789.0123456789");
|
"01234567890123456789012345678901234567890123456789adsa.0123456789");
|
||||||
test_clean_filename(
|
test_clean_filename(
|
||||||
"01234567890123456789012345678901234567890123456789<>*?: <>*?:0123456789adsasdasdsaa. "
|
"012345678901234567890123456789012345678901234567890123<>*?: <>*?:0123456789adsasdasdsaa. "
|
||||||
"0123456789`<><><>0123456789asdasdasdasd",
|
"0123456789`<>0123456789asdasdasdasd",
|
||||||
"01234567890123456789012345678901234567890123456789.0123456789 012");
|
"012345678901234567890123456789012345678901234567890123.0123456789 012");
|
||||||
test_clean_filename("C:/document.tar.gz", "document.tar.gz");
|
test_clean_filename("C:/document.tar.gz", "document.tar.gz");
|
||||||
test_clean_filename("test....", "test");
|
test_clean_filename("test....", "test");
|
||||||
test_clean_filename("....test", "test");
|
test_clean_filename("....test", "test");
|
||||||
test_clean_filename("test.exe....", "test.exe"); // extension has changed
|
test_clean_filename("test.exe....", "test.exe"); // extension has changed
|
||||||
test_clean_filename("test.exe01234567890123456789....",
|
test_clean_filename("test.exe01234567890123456789....",
|
||||||
"test.exe01234567890123456789"); // extension may be more than 20 characters
|
"test.exe01234567890123456789"); // extension may be more than 16 characters
|
||||||
test_clean_filename("....test....asdf", "test.asdf");
|
test_clean_filename("....test....asdf", "test.asdf");
|
||||||
test_clean_filename("കറുപ്പ്.txt", "കറപപ.txt");
|
test_clean_filename("കറുപ്പ്.txt", "കറപപ.txt");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user