[otrs-cvs] otrs/scripts/test Main.t,1.33,1.34

"CVS commits notifications of OTRS.org" <[email protected]>
Newsgroups gmane.comp.otrs.cvs
Message-ID <[email protected]>
Comments:
Update of /home/cvs/otrs/scripts/test
In directory lancelot:/tmp/cvs-serv17408/scripts/test

Modified Files:
	Main.t 
Log Message:
 - 2013-02-05 Fixed bug#9121 - Filenames with Unicode NFD are incorrectly reported as NFC by Main::DirectoryRead().

Author: mg

Index: Main.t
===================================================================
RCS file: /home/cvs/otrs/scripts/test/Main.t,v
retrieving revision 1.33
retrieving revision 1.34
diff -2 -u -d -r1.33 -r1.34
--- Main.t	20 Nov 2012 16:06:56 -0000	1.33
+++ Main.t	5 Feb 2013 10:43:07 -0000	1.34
@@ -1,5 +1,5 @@
 # --
 # Main.t - Main tests
-# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
+# Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
 # --
 # $Id$
@@ -323,5 +323,10 @@
 
 # create test files
-for my $Suffix ( 0 .. 5, 'öäüßカスタマ' ) {
+for my $Suffix (
+    0 .. 5,
+    'öäüßカスタマ',         # Unicode NFC
+    'Второй_файл',    # Unicode NFD
+    )
+{
     my $Success = $Self->{MainObject}->FileWrite(
         Directory => $DirectoryWithFiles,
@@ -348,4 +353,5 @@
             "$DirectoryWithFiles/Example_File_5",
             "$DirectoryWithFiles/Example_File_öäüßカスタマ",
+            "$DirectoryWithFiles/Example_File_Второй_файл",
         ],
     },
@@ -388,4 +394,5 @@
             "$DirectoryWithFiles/Example_File_5",
             "$DirectoryWithFiles/Example_File_öäüßカスタマ",
+            "$DirectoryWithFiles/Example_File_Второй_файл",
         ],
     },
@@ -402,4 +409,5 @@
             "$DirectoryWithFiles/Example_File_5",
             "$DirectoryWithFiles/Example_File_öäüßカスタマ",
+            "$DirectoryWithFiles/Example_File_Второй_файл",
         ],
     },
@@ -440,7 +448,10 @@
     );
 
-    #use Data::Dumper;
-    #print STDERR "Dump: " . Dumper(\@Results) . "\n";
-    #print STDERR "Dump: " . Dumper(\@UnicodeResults) . "\n";
+    # Mac OS will store all filenames as NFD internally.
+    if ( $^O eq 'darwin' ) {
+        for my $Index ( 0 .. $#UnicodeResults ) {
+            $UnicodeResults[$Index] = Unicode::Normalize::NFD( $UnicodeResults[$Index] );
+        }
+    }
 
     $Self->IsDeeply( \@Results, \@UnicodeResults, $Test->{Name} );

---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.