Browse Source

* fix tests

git-svn-id: trunk@712 -
peter 20 years ago
parent
commit
8d5a5299ab

+ 1 - 0
.gitattributes

@@ -6132,6 +6132,7 @@ tests/webtbs/tw4038.pp svneol=native#text/plain
 tests/webtbs/tw4043.pp svneol=native#text/plain
 tests/webtbs/tw4043.pp svneol=native#text/plain
 tests/webtbs/tw4055.pp svneol=native#text/plain
 tests/webtbs/tw4055.pp svneol=native#text/plain
 tests/webtbs/tw4058.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/tw4078.pp svneol=native#text/plain
 tests/webtbs/tw4089.pp svneol=native#text/plain
 tests/webtbs/tw4089.pp svneol=native#text/plain
 tests/webtbs/tw4093.pp svneol=native#text/plain
 tests/webtbs/tw4093.pp svneol=native#text/plain

+ 1 - 0
tests/webtbs/tw3540.pp

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

+ 1 - 1
tests/webtbs/tw3814.pp

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

+ 7 - 1
tests/webtbs/tw3970.pp

@@ -13,7 +13,13 @@ var
    s: ShortString;
    s: ShortString;
 
 
 begin
 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);
      Reset (f);
 
 
      ReadLn (f, i);
      ReadLn (f, i);

+ 7 - 1
tests/webtbs/tw3977.pp

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

+ 9 - 3
tests/webtbs/tw4038.pp

@@ -3,10 +3,16 @@
 { e-mail: [email protected] }
 { e-mail: [email protected] }
 uses sysutils;
 uses sysutils;
 var b: byte;
 var b: byte;
+    s : string;
 begin
 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;
   writeln;
   for b:=1 to 2 do
   for b:=1 to 2 do
-    writeln(executeprocess('echo','fails1 fails2 fails3'));
+    writeln(executeprocess(s,'fails1 fails2 fails3'));
 end.
 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 nok} { if this is defined, the operator with problem is compiled }
 { $define ok}  { if this is defined, the operator without 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
 type
   XTask   = type Pointer;
   XTask   = type Pointer;
   XInt4   = Integer;
   XInt4   = Integer;