Browse Source

* updated to work better with 1.0.x under linux

peter 24 years ago
parent
commit
64a116608c
5 changed files with 36 additions and 7 deletions
  1. 12 1
      tests/tbs/tb0038.pp
  2. 1 1
      tests/tbs/tb0369.pp
  3. 5 1
      tests/tbs/tb0376.pp
  4. 16 4
      tests/test/cg/treadwrt.pp
  5. 2 0
      tests/webtbs/tw1622.pp

+ 12 - 1
tests/tbs/tb0038.pp

@@ -1,9 +1,20 @@
 { %CPU=i386 }
-{ %OPT=-Ratt -Anasm }
 { %NOTE=This test requires an installed Nasm }
 { Old file: tbs0043.pp }
 {  shows assembler nasm output fpu opcodes problem     OK 0.99.6 (PFV) }
 
+{$ifdef linux}
+  {$output_format nasmelf}
+{$endif}
+{$ifdef go32v2}
+  {$output_format nasmcoff}
+{$endif}
+{$ifdef win32}
+  {$output_format nasmwin32}
+{$endif}
+
+{$asmmode att}
+
 { THE OUTPUT is incorrect but the }
 { parsing is correct.             }
 { under nasm output only.         }

+ 1 - 1
tests/tbs/tb0369.pp

@@ -1,7 +1,7 @@
 
 type
   ptchar=^tchar;
-  tchar=record
+  tchar=packed record
     c : char;
   end;
 

+ 5 - 1
tests/tbs/tb0376.pp

@@ -9,5 +9,9 @@ begin
 end;
 
 begin
-  f;
+  if f<>5 then
+   begin
+     writeln('error!');
+     halt(1);
+   end;
 end.

+ 16 - 4
tests/test/cg/treadwrt.pp

@@ -1,11 +1,19 @@
 {$i+}
 
+{ Widestring is not supported in 1.0.x }
+{$ifndef VER1_0}
+  {$define HASWIDESTR}
+{$endif VER1_0}
+
 procedure test_rwtext;
 var
   t: text;
   s: shortstring;
   a: ansistring;
-  w: widestring;
+{$ifdef HASWIDESTR}
+  wc : widechar;
+  w : widestring;
+{$endif HASWIDESTR}
   l: longint;
   card: cardinal;
   b: byte; bool: boolean;
@@ -31,7 +39,7 @@ begin
   writeln('floats: ',r,' ',r:1,' ',r:8,' ',r:10:2);
   arr := 'arrofchars';
   writeln('array of char: ',arr:38);
-  
+
   arr[10] := #0;
   p := @arr;
   writeln('pchar test: ',p);
@@ -39,14 +47,18 @@ begin
   a := 'this is an ansistring';
   writeln(a);
 
+{$ifdef HASWIDESTR}
+  wc := 'y';
+  writeln('widechar: ',wc);
   w := 'this is a widestring';
   writeln(w);
+{$endif HASWIDESTR}
 
   write('no new line now...',l,c,b);
-  
+
   write;
   read;
-  
+
   assign(t,'treadwrt.txt');
   rewrite(t);
   writeln('testing text file functionality...');

+ 2 - 0
tests/webtbs/tw1622.pp

@@ -4,6 +4,7 @@
 PROGRAM Test;
 
 
+{$ifdef go32v2}
 CONST
    SomeSegment = $B800;
    SomeOffset  = $0000;
@@ -20,6 +21,7 @@ VAR
    { address; that is correctly recognized   }
    { by Borland Pascal.                      }
    {-----------------------------------------}
+{$endif go32v2}
 
 
 { Adding some test code for normal absolute stuff }