Browse Source

merge r14129 from cpstrnew by paul (defcmp.pas is not merged because trunk already has this fix):
prefer widestring->unicodestring and vice versa conversions than widestring->ansistring

git-svn-id: trunk@19090 -

paul 14 years ago
parent
commit
067b863b1b
2 changed files with 28 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 27 0
      tests/test/tcpstr5.pp

+ 1 - 0
.gitattributes

@@ -9941,6 +9941,7 @@ tests/test/tcpstr2.pp svneol=native#text/plain
 tests/test/tcpstr2a.pp svneol=native#text/plain
 tests/test/tcpstr3.pp svneol=native#text/plain
 tests/test/tcpstr4.pp svneol=native#text/plain
+tests/test/tcpstr5.pp svneol=native#text/plain
 tests/test/tcstring1.pp svneol=native#text/pascal
 tests/test/tcstring2.pp svneol=native#text/pascal
 tests/test/tdel1.pp svneol=native#text/plain

+ 27 - 0
tests/test/tcpstr5.pp

@@ -0,0 +1,27 @@
+procedure pw(const S : RawByteString); overload;
+  begin
+    WriteLn('fail');
+  end;
+
+procedure pw(const S : WideString); overload;
+  begin
+    WriteLn('ok');
+  end;
+
+procedure pu(const S : RawByteString); overload;
+  begin
+    WriteLn('fail');
+  end;
+
+procedure pu(const S : UnicodeString); overload;
+  begin
+    WriteLn('ok');
+  end;
+
+var
+  u : UnicodeString;
+  w : WideString;
+begin
+  pw(u);
+  pu(w);
+end.