瀏覽代碼

* disabled part of test that is broken on systems using utf-8 as
DefaultSystemCodePage
* fixed use of wrong string length in second part of test

git-svn-id: trunk@19203 -

Jonas Maebe 14 年之前
父節點
當前提交
64f8ec7a9a
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      tests/test/tcpstransistr2widechararray.pp

+ 7 - 1
tests/test/tcpstransistr2widechararray.pp

@@ -21,6 +21,11 @@ var
   uc : UnicodeChar;
   us : UnicodeString;
 begin
+{$ifdef broken}
+  
+  This only works if the DefaultSystemCodePage is guaranteed to be
+  different from utf-8 }
+
   sa := 'abc'#$00A9#$00AE'123';
   ua := sa;
   for i := 1 to Length(sa) do
@@ -31,10 +36,11 @@ begin
         doerror(1);
       end;
     end;
+{$endif}
   x := 'abc'#$00A9#$00AE'123';
   ua := x;
   us := x;
-  for i := 1 to Length(sa) do
+  for i := 1 to Length(us) do
     begin
       uc := us[i];
       if (uc <> ua[i-1]) then begin