diff --git a/.gitattributes b/.gitattributes index 3f5249c9fa..3b569cd405 100644 --- a/.gitattributes +++ b/.gitattributes @@ -9936,6 +9936,11 @@ tests/test/tconstref1.pp svneol=native#text/pascal tests/test/tconstref2.pp svneol=native#text/pascal tests/test/tconstref3.pp svneol=native#text/pascal tests/test/tconstref4.pp svneol=native#text/pascal +tests/test/tcpstr1.pp svneol=native#text/plain +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/tcstring1.pp svneol=native#text/pascal tests/test/tcstring2.pp svneol=native#text/pascal tests/test/tdel1.pp svneol=native#text/plain diff --git a/tests/test/tcpstr1.pp b/tests/test/tcpstr1.pp new file mode 100644 index 0000000000..6006627587 --- /dev/null +++ b/tests/test/tcpstr1.pp @@ -0,0 +1,30 @@ +type + tcpstr437 = string<437>; + tcpstr850 = string<850>; +var + a1 : tcpstr437; + a2 : utf8string; + a3 : tcpstr850; + u1 : unicodestring; +begin + a1:=#132; + a2:=a1; + if ord(a2[1])<>195 then + halt(1); + if ord(a2[2])<>164 then + halt(1); + + writeln('---'); + + a3:=a1; + if ord(a3[1])<>132 then + halt(1); + + writeln('---'); + + u1:=a1; + if ord(u1[1])<>228 then + halt(1); + + writeln('ok'); +end. diff --git a/tests/test/tcpstr2.pp b/tests/test/tcpstr2.pp new file mode 100644 index 0000000000..fe7a478ea9 --- /dev/null +++ b/tests/test/tcpstr2.pp @@ -0,0 +1,12 @@ +procedure p(const S : RawByteString); overload; + begin + end; + +procedure p(const S : UTF8String); overload; + begin + end; +var + s1 : RawByteString; +begin + p(s1); +end. diff --git a/tests/test/tcpstr2a.pp b/tests/test/tcpstr2a.pp new file mode 100644 index 0000000000..59c962490d --- /dev/null +++ b/tests/test/tcpstr2a.pp @@ -0,0 +1,13 @@ +{ %fail } +procedure p(const S : RawByteString); overload; + begin + end; + +procedure p(const S : UTF8String); overload; + begin + end; +var + s1 : Ansistring; +begin + p(s1); +end. diff --git a/tests/test/tcpstr3.pp b/tests/test/tcpstr3.pp new file mode 100644 index 0000000000..722139bcbd --- /dev/null +++ b/tests/test/tcpstr3.pp @@ -0,0 +1,11 @@ +{ %fail } +procedure p(var S : RawByteString); + begin + end; + +var + s1 : ansistring; + +begin + p(s1); +end. diff --git a/tests/test/tcpstr4.pp b/tests/test/tcpstr4.pp new file mode 100644 index 0000000000..4a73d99469 --- /dev/null +++ b/tests/test/tcpstr4.pp @@ -0,0 +1,11 @@ +{ %fail } +procedure p(var S : RawByteString); + begin + end; + +var + s1 : UTF8String; + +begin + p(s1); +end.