Browse Source

* initial commit

git-svn-id: trunk@552 -
florian 20 years ago
parent
commit
833a6d40d4
2 changed files with 34 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 33 0
      tests/webtbs/tw4119.pp

+ 1 - 0
.gitattributes

@@ -6119,6 +6119,7 @@ tests/webtbs/tw4093.pp svneol=native#text/plain
 tests/webtbs/tw4098.pp svneol=native#text/plain
 tests/webtbs/tw4100.pp svneol=native#text/plain
 tests/webtbs/tw4115.pp svneol=native#text/plain
+tests/webtbs/tw4119.pp svneol=native#text/plain
 tests/webtbs/tw4140.pp svneol=native#text/plain
 tests/webtbs/ub1873.pp svneol=native#text/plain
 tests/webtbs/ub1883.pp svneol=native#text/plain

+ 33 - 0
tests/webtbs/tw4119.pp

@@ -0,0 +1,33 @@
+{ Source provided for Free Pascal Bug Report 4119 }
+{ Submitted by "C Western" on  2005-06-26 }
+{ e-mail: [email protected] }
+
+uses StrUtils;
+
+function mypos(s1,s2 : widestring) : integer;overload;
+  begin
+    result:=pos(s1,s2);
+  end;
+
+function mypos(s1,s2 : ansistring) : integer;overload;
+  begin
+    result:=pos(s1,s2);
+  end;
+
+function mypos(s1,s2 : shortstring) : integer;overload;
+  begin
+    result:=pos(s1,s2);
+  end;
+
+var
+ s:AnsiString;
+ p:ShortString;
+ ws:widestring;
+begin
+  s:=DupeString('a',300)+'b';
+  ws:=s;
+  p:='b';
+  WriteLn(MyPos('b',s));
+  WriteLn(MyPos(p,s));
+  WriteLn(MyPos(p,ws));
+end.