2
0
carl 23 жил өмнө
parent
commit
f1f361fc38

+ 28 - 0
tests/webtbs/tw2028.pp

@@ -0,0 +1,28 @@
+{ Source provided for Free Pascal Bug Report 2028 }
+{ Submitted by "Han Wentao" on  2002-07-04 }
+{ e-mail: [email protected] }
+{$INLINE ON}
+function Max(a,b:Byte):Byte; inline;
+begin
+  if a>b then
+    Max:=a
+  else
+    Max:=b;
+end;
+
+var
+ l1,  l2 : longint;
+begin
+  l1:=Max(1,2);
+  l2:=Max(2,1);
+  if l1 <> 2 then
+   begin
+     WriteLn('Error!');
+     halt(1);
+   end;
+  if l2 <> 2 then
+   begin
+     WriteLn('Error!');
+     halt(1);
+   end;
+end.

+ 15 - 0
tests/webtbs/tw2037.pp

@@ -0,0 +1,15 @@
+{ Source provided for Free Pascal Bug Report 2037 }
+{ Submitted by "David Hagler" on  2002-07-11 }
+{ e-mail: [email protected] }
+program tw2037;
+
+const
+  FILE_FLAG_WRITE_THROUGH = 2147483648;
+  FILE_ATTRIBUTE_NORMAL = 128;
+
+var
+  anattr : cardinal;
+
+begin
+  anattr := FILE_FLAG_WRITE_THROUGH or FILE_ATTRIBUTE_NORMAL;
+end.

+ 19 - 0
tests/webtbs/tw2069.pp

@@ -0,0 +1,19 @@
+{ Source provided for Free Pascal Bug Report 2069 }
+{ Submitted by "Sergey Kosarevsky" on  2002-08-07 }
+{ e-mail: [email protected] }
+Const WhiteSpace = [' ',#0,#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12,#13,#14,#15,#16,#17,#18,#19,#20,#21,#22,#23,#24,#25,#26,#27,#28,#29,#30,#31];
+
+Function Trim(Const S:String):String;
+Var Ofs,Len:Integer;
+Begin
+   Len:=Length(S);
+   While (Len>0) And 
+         (S[Len] In WhiteSpace) Do Dec(Len);
+   Ofs:=1;
+   While (Ofs<=Len) And 
+         (S[Ofs] In WhiteSpace) Do Inc(Ofs);
+   Exit(Copy(S,Ofs,1+Len-Ofs));
+End;
+
+Begin
+End.