The unit test should prevent the issues explained in bug #3256 from
happening in the future.

Signed-off-by: Laurențiu Leahu-Vlăducu <l.leahu-vlad...@proxmox.com>
---
 test/section_config_test.pl | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/test/section_config_test.pl b/test/section_config_test.pl
index 343e4c8..5629651 100755
--- a/test/section_config_test.pl
+++ b/test/section_config_test.pl
@@ -194,6 +194,31 @@ two: t3
        another even more text
 EOF
 
+my $unicode_data = {
+    ids => {
+           t1 => {
+               type => 'one',
+               common => Encode::decode('UTF-8', '🍕'),
+               field1 => 3,
+               another => Encode::decode('UTF-8', '🟥🟧🟨🟩🟦🟪🟫⬛️⬜️🧮🌈🇨🇭'),
+           },
+       },
+       order => { t1 => 1 },
+};
+
+my $unicode_text = <<"EOF";
+one: t1
+       common 🍕
+       field1 3
+       another 🟥🟧🟨🟩🟦🟪🟫⬛️⬜️🧮🌈🇨🇭
+EOF
+
+Conf->expect_success(
+    'test_unicode',
+    $unicode_data,
+    $unicode_text);
+
+
 my $with_unknown_data = {
     ids => {
        t1 => {
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to