]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: Add UDF hdd image with emoji label created by mkudffs 2.2
authorPali Rohár <pali.rohar@gmail.com>
Sun, 9 Feb 2020 12:04:39 +0000 (13:04 +0100)
committerPali Rohár <pali.rohar@gmail.com>
Sun, 9 Feb 2020 12:04:39 +0000 (13:04 +0100)
mkudffs 2.2 can create UDF filesystem which label contains Unicode code
points above U+FFFF which cannot be represented by UCS-2 encoding and
therefore UTF-16 needs to be used (via surrogate pairs). Unicode code
points above U+FFFF are encoded in UTF-8 by four bytes and some example is
emoji "😀".

This is test case to check that libblkid correctly supports UTF-16
decoding. It was created by mkudffs 2.2:

$ dd if=/dev/zero of=udf-hdd-mkudffs-2.2.img bs=1M count=10
$ mkudffs -l 😀 udf-hdd-mkudffs-2.2.img

tests/expected/blkid/low-probe-udf-hdd-mkudffs-2.2 [new file with mode: 0644]
tests/ts/blkid/images-fs/udf-hdd-mkudffs-2.2.img.xz [new file with mode: 0644]

diff --git a/tests/expected/blkid/low-probe-udf-hdd-mkudffs-2.2 b/tests/expected/blkid/low-probe-udf-hdd-mkudffs-2.2
new file mode 100644 (file)
index 0000000..a1d9ee1
--- /dev/null
@@ -0,0 +1,11 @@
+ID_FS_BLOCK_SIZE=512
+ID_FS_LABEL=😀
+ID_FS_LABEL_ENC=😀
+ID_FS_LOGICAL_VOLUME_ID=😀
+ID_FS_TYPE=udf
+ID_FS_USAGE=filesystem
+ID_FS_UUID=5e3d6e3fee58c271
+ID_FS_UUID_ENC=5e3d6e3fee58c271
+ID_FS_VERSION=2.01
+ID_FS_VOLUME_ID=😀
+ID_FS_VOLUME_SET_ID=5e3d6e3fee58c271LinuxUDF
diff --git a/tests/ts/blkid/images-fs/udf-hdd-mkudffs-2.2.img.xz b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-2.2.img.xz
new file mode 100644 (file)
index 0000000..bc00729
Binary files /dev/null and b/tests/ts/blkid/images-fs/udf-hdd-mkudffs-2.2.img.xz differ