Pārlūkot izejas kodu

Merged revisions 712-713 via svnmerge from
/trunk

git-svn-id: branches/fixes_2_0@722 -

peter 20 gadi atpakaļ
vecāks
revīzija
439110acc9

+ 1 - 0
.gitattributes

@@ -5969,6 +5969,7 @@ tests/webtbs/tw4038.pp svneol=native#text/plain
 tests/webtbs/tw4043.pp svneol=native#text/plain
 tests/webtbs/tw4055.pp svneol=native#text/plain
 tests/webtbs/tw4058.pp svneol=native#text/plain
+tests/webtbs/tw4068.pp svneol=native#text/plain
 tests/webtbs/tw4078.pp svneol=native#text/plain
 tests/webtbs/tw4089.pp svneol=native#text/plain
 tests/webtbs/tw4093.pp svneol=native#text/plain

+ 8 - 8
fcl/inc/fpasync.pp

@@ -1,7 +1,7 @@
 {
 
     fpAsync: Asynchronous event management for Free Pascal
-    Copyright (C) 2001-2003 by
+    Copyright (C) 2001-2005 by
       Areca Systems GmbH / Sebastian Guenther, [email protected]
 
     See the file COPYING.FPC, included in this distribution,
@@ -548,18 +548,18 @@ begin
         LastEndOfLine := i + 1;
 
         if Assigned(FOnLine) then
-        begin
+	begin
           FBuffer := RealBuffer + LastEndOfLine;
           FBytesInBuffer := CurBytesInBuffer - LastEndOfLine;
-          InCallback := True;
-          try
+	  InCallback := True;
+	  try
             FOnLine(line);
-          finally
-            InCallback := False;
-          end;
+	  finally
+	    InCallback := False;
+	  end;
           // Check if <this> has been destroyed by FOnLine:
           if DoStopAndFree then
-            exit;
+	    exit;
         end;
       end;
       Inc(i);

+ 1 - 0
tests/webtbs/tw3540.pp

@@ -1,3 +1,4 @@
+{ %target=win32 }
 { %norun }
 { %cpu=i386 }
 { %opt=-s -Amasm -TWin32 -Rintel }

+ 1 - 1
tests/webtbs/tw3814.pp

@@ -42,7 +42,7 @@ begin
   WriteLn('Starting MyThread.Execute');
   repeat
     // sleep(500);
-    if worker.count<10 then
+    if worker.counter<10 then
       Synchronize(worker.count);
   until Terminated;
   WriteLn('Ending MyThread.Execute');

+ 7 - 1
tests/webtbs/tw3970.pp

@@ -13,7 +13,13 @@ var
    s: ShortString;
 
 begin
-     Assign (f, 'test.dat');
+     Assign (f, 'tw3970.tmp');
+     Rewrite (f);
+     writeln(f,'1');
+     writeln(f,'2');
+     close(f);
+
+     Assign (f, 'tw3970.tmp');
      Reset (f);
 
      ReadLn (f, i);

+ 7 - 1
tests/webtbs/tw3977.pp

@@ -3,8 +3,14 @@
 { e-mail: [email protected] }
 var
   n:integer;
+  f : text;
 begin
-  assign(input,'tw3977.txt');
+  assign(f,'tw3977.tmp');
+  rewrite(f);
+  write(f,'1');
+  close(f);
+
+  assign(input,'tw3977.tmp');
   reset(input);
   readln(n);
   close(output);

+ 9 - 3
tests/webtbs/tw4038.pp

@@ -3,10 +3,16 @@
 { e-mail: [email protected] }
 uses sysutils;
 var b: byte;
+    s : string;
 begin
-  writeln(executeprocess('echo','works1 works2 works3'));
-  writeln(executeprocess('echo','works1 works2 works3'));
+{$ifdef unix}
+  s:='/bin/echo';
+{$else}
+  s:='echo';
+{$endif}
+  writeln(executeprocess(s,'works1 works2 works3'));
+  writeln(executeprocess(s,'works1 works2 works3'));
   writeln;
   for b:=1 to 2 do
-    writeln(executeprocess('echo','fails1 fails2 fails3'));
+    writeln(executeprocess(s,'fails1 fails2 fails3'));
 end.

+ 19 - 0
tests/webtbs/tw4068.pp

@@ -0,0 +1,19 @@
+{ %opt=-Sen }
+
+{ Source provided for Free Pascal Bug Report 4068 }
+{ Submitted by "David Butler" on  2005-06-12 }
+{ e-mail: [email protected] }
+
+{$mode delphi}
+
+function test: boolean;
+var A, B : AnsiChar;
+begin
+  A := '1';
+  B := '2';
+  Result := ('0' in [A..B]);
+end;
+
+begin
+  test;
+end.

+ 2 - 0
tests/webtbs/tw4173.pp

@@ -8,6 +8,8 @@
 }
 
 
+{$inline on}
+
 {$define nok} { if this is defined, the operator with problem is compiled }
 { $define ok}  { if this is defined, the operator without problem is compiled }
 

+ 2 - 0
tests/webtbs/tw4202.pp

@@ -1,3 +1,5 @@
+{$mode delphi}
+
 type
   XTask   = type Pointer;
   XInt4   = Integer;