diff options
| author | Joel Klinghed <the_jk@spawned.biz> | 2024-09-25 21:47:01 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@spawned.biz> | 2024-09-25 21:47:01 +0200 |
| commit | 2d8949a0d9333bfda2385e3eab124581704286bf (patch) | |
| tree | 7c8845e80842e9cb88d2ca674b06022574f88444 /libs/test-utils | |
| parent | 00754eea8d203e34e2a2a52f23231fd7146e0629 (diff) | |
Add unicode filename test
And fix errors in MUTF-8 conversion in jni.cpp
Diffstat (limited to 'libs/test-utils')
| -rw-r--r-- | libs/test-utils/src/main/java/org/the_jk/cleversync/TreeAbstractTest.kt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libs/test-utils/src/main/java/org/the_jk/cleversync/TreeAbstractTest.kt b/libs/test-utils/src/main/java/org/the_jk/cleversync/TreeAbstractTest.kt index 396e801..2555195 100644 --- a/libs/test-utils/src/main/java/org/the_jk/cleversync/TreeAbstractTest.kt +++ b/libs/test-utils/src/main/java/org/the_jk/cleversync/TreeAbstractTest.kt @@ -353,6 +353,19 @@ abstract class TreeAbstractTest { assertThat(old.isBefore(new) || old == new).isTrue() } + @Test + open fun unicodeFilename() { + val file = tree.createFile("r\u00E4ksm\u00f6rg\u00E4s") + file.write().use { it.write("Delicious".toByteArray()) } + val dir = tree.createDirectory("\uD83D\uDCA9") + + val content = tree.list() + assertThat(content.directories).hasSize(1) + assertThat(content.directories[0].name).isEqualTo(dir.name) + assertThat(content.files).hasSize(1) + assertThat(content.files[0].name).isEqualTo(file.name) + } + protected abstract fun supportSymlinks(): Boolean protected abstract fun idle() |
