Browse Source

* correction of tests for Amiga (volumes, exclusion of some '.'/'..' related tests)

git-svn-id: trunk@30654 -
Tomas Hajny 10 years ago
parent
commit
3ded26a774
1 changed files with 34 additions and 17 deletions
  1. 34 17
      tests/test/units/dos/tfexpand.pp

+ 34 - 17
tests/test/units/dos/tfexpand.pp

@@ -59,9 +59,16 @@ uses
 {$ENDIF LINUX}
 
 {$IFDEF AMIGA}
+ {$IFNDEF HASAMIGA}
+  {$DEFINE HASAMIGA}
+ {$ENDIF HASAMIGA}
+{$ENDIF AMIGA}
+
+{$IFDEF HASAMIGA}
  {$DEFINE VOLUMES}
  {$DEFINE NODRIVEC}
-{$ENDIF AMIGA}
+ {$DEFINE NODOTS}
+{$ENDIF HASAMIGA}
 
 {$IFDEF NETWARE}
  {$DEFINE VOLUMES}
@@ -289,7 +296,7 @@ begin
  GetDir (3, CDir);
 {$ENDIF NODRIVEC}
  Check (' ', CurDir + DirSep + ' ');
-{$IFDEF AMIGA}
+{$IFDEF HASAMIGA}
  Check ('', CurDir);
 {$ELSE AMIGA}
  Check ('', CurDir + DirSep);
@@ -304,26 +311,26 @@ begin
 if CDir [Length (CDir)] = DirSep then Check ('c:anything', CDir + 'anything')
                          else Check ('c:anything', CDir + DirSep + 'anything');
  Check (CC + DirSep, CDrive + DirSep);
-{$IFDEF NODOTS}
+ {$IFDEF NODOTS}
  Check ('C:.', 'C:.');
  Check (CC + DirSep + '.', CDrive + DirSep + '.');
  Check (CC + DirSep + '..', CDrive + DirSep + '..');
-{$ELSE NODOTS}
+ {$ELSE NODOTS}
  Check ('C:.', CDir);
  Check (CC + DirSep + '.', CDrive + DirSep);
  Check (CC + DirSep + '..', CDrive + DirSep);
-{$ENDIF NODOTS}
+ {$ENDIF NODOTS}
  Check (CC + DirSep + 'DOS', CDrive + DirSep + 'DOS');
-{$IFNDEF NODOTS}
+ {$IFNDEF NODOTS}
  Check (CC + DirSep + '..' + DirSep + 'DOS', CDrive + DirSep + 'DOS');
-{$ENDIF NODOTS}
+ {$ENDIF NODOTS}
  Check (CC + DirSep + 'DOS.', CDrive + DirSep + 'DOS.');
-{$IFDEF AMIGA}
+ {$IFDEF HASAMIGA} (* This has no effect - AMIGA has NODRIVEC defined... *)
  Check (CC + DirSep + 'DOS' + DirSep, CDrive + DirSep);
-{$ELSE AMIGA}
+ {$ELSE HASAMIGA}
  Check (CC + DirSep + 'DOS' + DirSep, CDrive + DirSep + 'DOS' + DirSep);
-{$ENDIF AMIGA}
-{$IFNDEF NODOTS}
+ {$ENDIF HASAMIGA}
+ {$IFNDEF NODOTS}
  Check (CC + DirSep + 'DOS' + DirSep + '.', CDrive + DirSep + 'DOS');
  Check (CC + DirSep + 'DOS' + DirSep + '..', CDrive + DirSep);
  Check (CC + DirSep + 'DOS' + DirSep + '..' + DirSep, CDrive + DirSep);
@@ -331,14 +338,20 @@ if CDir [Length (CDir)] = DirSep then Check ('c:anything', CDir + 'anything')
                                                                DirSep + 'DOS');
  Check ('C:' + DirSep + 'DOS' + DirSep + 'TEST' + DirSep + '..' + DirSep,
                                              CDrive + DirSep + 'DOS' + DirSep);
-{$ENDIF NODOTS}
+ {$ENDIF NODOTS}
 {$ENDIF NODRIVEC}
 
 {$IFNDEF MACOS}
+ {$IFDEF HASAMIGA}
+ Check (DirSep, TestDir + TestDir1Name);
+ Check (DirSep + DirSep + TestFileName, TestDir + TestFileName);
+ Check (DirSep + 'DOS', TestDir + TestDir1Name + DirSep + 'DOS');
+ {$ELSE HASAMIGA}
  Check (DirSep, TestDrive + DirSep);
  Check (DirSep + '.', TestDrive + DirSep);
  Check (DirSep + '..', TestDrive + DirSep);
  Check (DirSep + 'DOS', TestDrive + DirSep + 'DOS');
+ {$ENDIF HASAMIGA}
 {$ENDIF MACOS}
  Check ('d', CurDir + DirSep + 'd');
 {$IFDEF MACOS}
@@ -367,15 +380,15 @@ if CDir [Length (CDir)] = DirSep then Check ('c:anything', CDir + 'anything')
  Check ('.special', CurDir + DirSep + '.special');
  Check ('..special', CurDir + DirSep + '..special');
  Check ('special..', CurDir + DirSep + 'special..');
-{$IFDEF AMIGA}
- Check ('special.' + DirSep, CurDir);
-{$ELSE AMIGA}
+{$IFDEF HASAMIGA}
+ Check ('special.' + DirSep, CurDir + DirSep + 'special.' + DirSep);
+{$ELSE HASAMIGA}
  {$IFDEF MACOS}
  Check ('special.' + DirSep, 'special.' + DirSep);
  {$ELSE MACOS}
  Check ('special.' + DirSep, CurDir + DirSep + 'special.' + DirSep);
  {$ENDIF MACOS}
-{$ENDIF AMIGA}
+{$ENDIF HASAMIGA}
 {$IFDEF MACOS}
  Check (DirSep + DirSep, TestDir + TestDir1Name + DirSep);
  Check (DirSep + DirSep + TestFileName, TestDir + TestDir1Name + DirSep
@@ -481,7 +494,11 @@ if CDir [Length (CDir)] = DirSep then Check ('c:anything', CDir + 'anything')
  {$ENDIF NODRIVEC}
 {$ENDIF UNIX}
 {$IFDEF VOLUMES}
+ {$IFDEF HASAMIGA}
+ Check ('VolName' + DriveSep + 'DIR1', 'VolName' + DriveSep + 'DIR1');
+ {$ELSE HASAMIGA}
  Check ('VolName' + DriveSep + DirSep + 'DIR1', 'VolName' + DriveSep + DirSep + 'DIR1');
+ {$ENDIF HASAMIGA}
  {$IFNDEF NODOTS}
  Check ('VolName' + DriveSep + DirSep + 'DIR1' + DirSep + '..', 'VolName' + DriveSep + DirSep);
  Check ('VolName' + DriveSep + DirSep + 'DIR1' + DirSep + '..' + DirSep + '..',
@@ -496,7 +513,7 @@ if CDir [Length (CDir)] = DirSep then Check ('c:anything', CDir + 'anything')
  Check ('SrvName/VolName' + DriveSep + DirSep + 'TEST', 'SrvName' + DirSep + 'VolName' +
                                                          DriveSep + DirSep + 'TEST');
  {$ENDIF NETWARE}
- {$IFDEF AMIGA}
+ {$IFDEF HASAMIGA}
   {$IFDEF NODOTS}
  Check ('.', CurDir + DirSep + '.');
   {$ELSE NODOTS}