Ver Fonte

merge r14170 from cpstrnew branch by paul:
add a test wich fails at moment

git-svn-id: trunk@19101 -

paul há 14 anos atrás
pai
commit
eefa5dbf25
2 ficheiros alterados com 29 adições e 0 exclusões
  1. 1 0
      .gitattributes
  2. 28 0
      tests/test/tcpstr8.pp

+ 1 - 0
.gitattributes

@@ -9944,6 +9944,7 @@ tests/test/tcpstr4.pp svneol=native#text/plain
 tests/test/tcpstr5.pp svneol=native#text/plain
 tests/test/tcpstr6.pp svneol=native#text/plain
 tests/test/tcpstr7.pp svneol=native#text/plain
+tests/test/tcpstr8.pp svneol=native#text/pascal
 tests/test/tcstring1.pp svneol=native#text/pascal
 tests/test/tcstring2.pp svneol=native#text/pascal
 tests/test/tdel1.pp svneol=native#text/plain

+ 28 - 0
tests/test/tcpstr8.pp

@@ -0,0 +1,28 @@
+program test;
+{$CODEPAGE UTF8}
+// file encoding is UTF8
+type
+  CP866String = string<866>;
+  CP1251String = string<1251>;
+
+procedure WriteString(const s: RawByteString);
+begin
+  Write(StringCodePage(s), ' : ');
+  WriteLn(s);
+end;
+
+var
+  u1: UTF8String;
+  s1: CP1251String;
+  s2: CP866String;
+begin
+  u1 := 'мама';
+  s1 := u1;
+  u1 := ' мыла';
+  s2 := u1;
+  u1 := ' раму';
+  s2 := s1 + u1 + s2;
+  WriteString(s2);
+end.
+
+