mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2026-05-16 04:52:39 +02:00
Refs and tests
This commit is contained in:
Submodule app/src/stable/assets/sources/bilibili updated: 650ef8e5a9...3cc6d553cf
@@ -0,0 +1,23 @@
|
||||
package com.futo.platformplayer
|
||||
|
||||
import com.futo.platformplayer.helpers.FileHelper.Companion.sanitizeFileName
|
||||
import org.junit.Assert
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertFalse
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Test
|
||||
import java.time.OffsetDateTime
|
||||
import java.time.ZoneOffset
|
||||
|
||||
class ExtensionsFileTests {
|
||||
@Test
|
||||
fun test_sanitizeFileName1() {
|
||||
assertEquals("Helloworld", "Hello world".sanitizeFileName());
|
||||
assertEquals("Hello world", "Hello world".sanitizeFileName(true));
|
||||
assertEquals("漫漫听-点唱-公主冠", "漫漫听-点唱- 公主冠".sanitizeFileName());
|
||||
assertEquals("食べる", "食べ る".sanitizeFileName()); //Hiragana
|
||||
assertEquals("テレビ", "テレ ビ".sanitizeFileName()); //Katakana
|
||||
assertEquals("يخبر", "ي خبر".sanitizeFileName()); //Arabic
|
||||
assertEquals("..testing", "../testing".sanitizeFileName()); //Escaping
|
||||
}
|
||||
}
|
||||
Submodule app/src/unstable/assets/sources/bilibili updated: 650ef8e5a9...3cc6d553cf
Reference in New Issue
Block a user