summaryrefslogtreecommitdiff
path: root/atarist/test
diff options
context:
space:
mode:
Diffstat (limited to 'atarist/test')
-rw-r--r--atarist/test/binhandl15
-rw-r--r--atarist/test/ccon5
-rw-r--r--atarist/test/dbm124
-rw-r--r--atarist/test/err4
-rw-r--r--atarist/test/gdbm28
-rw-r--r--atarist/test/gdbm.t101
-rw-r--r--atarist/test/glob4
-rw-r--r--atarist/test/osexample.pl5
-rw-r--r--atarist/test/pi.pl174
-rw-r--r--atarist/test/printenv16
-rw-r--r--atarist/test/readme3
-rw-r--r--atarist/test/sig12
-rw-r--r--atarist/test/tbinmode12
13 files changed, 0 insertions, 503 deletions
diff --git a/atarist/test/binhandl b/atarist/test/binhandl
deleted file mode 100644
index 6f62f4d6cc..0000000000
--- a/atarist/test/binhandl
+++ /dev/null
@@ -1,15 +0,0 @@
-die "Usage: binhandl files ...\n" if $#ARGV < $[;
-
-NEXTFILE:
-while ($FILEHAND = shift) {
- unless (open(FILEHAND)) {
- printf STDERR "Can't open \"$FILEHAND\"\n";
- next NEXTFILE;
- }
- if (-B FILEHAND) {
- print "\"$FILEHAND\" is binary\n";
- } else {
- print "\"$FILEHAND\" is text\n";
- }
- close(FILEHAND);
-}
diff --git a/atarist/test/ccon b/atarist/test/ccon
deleted file mode 100644
index 47bc8e2f05..0000000000
--- a/atarist/test/ccon
+++ /dev/null
@@ -1,5 +0,0 @@
-require 'osbind.pl';
-
- &Cconws("Hello World\r\n");
- $str = "This is a string being printed by Fwrite Gemdos trap\r\n";
- &Fwrite(1, length($str), $str);
diff --git a/atarist/test/dbm b/atarist/test/dbm
deleted file mode 100644
index b73e07dccb..0000000000
--- a/atarist/test/dbm
+++ /dev/null
@@ -1,124 +0,0 @@
-die "cant create dbmtest" unless dbmopen(%keys, "dbmtest", 0666);
-
-print "Writing...\n";
-$keys{'key0'} = 0;
-$keys{'key1'} = 1;
-$keys{'key2'} = 2;
-$keys{'key3'} = 3;
-$keys{'key4'} = 4;
-$keys{'key5'} = 5;
-$keys{'key6'} = 6;
-$keys{'key7'} = 7;
-$keys{'key8'} = 8;
-$keys{'key9'} = 9;
-$keys{'key10'} = 10;
-$keys{'key11'} = 11;
-$keys{'key12'} = 12;
-$keys{'key13'} = 13;
-$keys{'key14'} = 14;
-$keys{'key15'} = 15;
-$keys{'key16'} = 16;
-$keys{'key17'} = 17;
-$keys{'key18'} = 18;
-$keys{'key19'} = 19;
-$keys{'key20'} = 20;
-$keys{'key21'} = 21;
-$keys{'key22'} = 22;
-$keys{'key23'} = 23;
-$keys{'key24'} = 24;
-$keys{'key25'} = 25;
-$keys{'key26'} = 26;
-$keys{'key27'} = 27;
-$keys{'key28'} = 28;
-$keys{'key29'} = 29;
-$keys{'key30'} = 30;
-$keys{'key31'} = 31;
-$keys{'key32'} = 32;
-$keys{'key33'} = 33;
-$keys{'key34'} = 34;
-$keys{'key35'} = 35;
-$keys{'key36'} = 36;
-$keys{'key37'} = 37;
-$keys{'key38'} = 38;
-$keys{'key39'} = 39;
-$keys{'key40'} = 40;
-$keys{'key41'} = 41;
-$keys{'key42'} = 42;
-$keys{'key43'} = 43;
-$keys{'key44'} = 44;
-$keys{'key45'} = 45;
-$keys{'key46'} = 46;
-$keys{'key47'} = 47;
-$keys{'key48'} = 48;
-$keys{'key49'} = 49;
-$keys{'key50'} = 50;
-$keys{'key51'} = 51;
-$keys{'key52'} = 52;
-$keys{'key53'} = 53;
-$keys{'key54'} = 54;
-$keys{'key55'} = 55;
-$keys{'key56'} = 56;
-$keys{'key57'} = 57;
-$keys{'key58'} = 58;
-$keys{'key59'} = 59;
-$keys{'key60'} = 60;
-$keys{'key61'} = 61;
-$keys{'key62'} = 62;
-$keys{'key63'} = 63;
-$keys{'key64'} = 64;
-$keys{'key65'} = 65;
-$keys{'key66'} = 66;
-$keys{'key67'} = 67;
-$keys{'key68'} = 68;
-$keys{'key69'} = 69;
-$keys{'key70'} = 70;
-$keys{'key71'} = 71;
-$keys{'key72'} = 72;
-$keys{'key73'} = 73;
-$keys{'key74'} = 74;
-$keys{'key75'} = 75;
-$keys{'key76'} = 76;
-$keys{'key77'} = 77;
-$keys{'key78'} = 78;
-$keys{'key79'} = 79;
-$keys{'key80'} = 80;
-$keys{'key81'} = 81;
-$keys{'key82'} = 82;
-$keys{'key83'} = 83;
-$keys{'key84'} = 84;
-$keys{'key85'} = 85;
-$keys{'key86'} = 86;
-$keys{'key87'} = 87;
-$keys{'key88'} = 88;
-$keys{'key89'} = 89;
-$keys{'key90'} = 90;
-$keys{'key91'} = 91;
-$keys{'key92'} = 92;
-$keys{'key93'} = 93;
-$keys{'key94'} = 94;
-$keys{'key95'} = 95;
-$keys{'key96'} = 96;
-$keys{'key97'} = 97;
-$keys{'key98'} = 98;
-$keys{'key99'} = 99;
-$keys{'key9998'} = 9998;
-$keys{'key9999'} = 9999;
-print "Done\n";
-
-dbmclose (%keys);
-
-die "cant read dbmtest" unless dbmopen(%rkeys, "dbmtest", undef);
-
-$i = 0;
-print "Reading...\n";
-while (($key, $val) = each %rkeys)
-{
- if ($keys{$key} != $val)
- {
- print 'Incorrect val ', $key, ' = ', $val, ' expecting ', $keys{$key}, "\n";
- $i = $i + 1;
- }
-}
-print "Done\n";
-dbmclose (%keys);
-print $i, "Error(s)\n";
diff --git a/atarist/test/err b/atarist/test/err
deleted file mode 100644
index cf32624c0f..0000000000
--- a/atarist/test/err
+++ /dev/null
@@ -1,4 +0,0 @@
-$! = 0 + 0;
-print $!, "\n";
-$e = $! + 0;
-print $e, "\n";
diff --git a/atarist/test/gdbm b/atarist/test/gdbm
deleted file mode 100644
index 207eea39a1..0000000000
--- a/atarist/test/gdbm
+++ /dev/null
@@ -1,28 +0,0 @@
-die "cant create dbmtest" unless dbmopen(%keys, "dbmtest", 0666);
-
-print "Writing...\n";
-
-foreach (0..100) {
- $keys{"$_"} = $_;
-}
-
-print "Done\n";
-
-dbmclose (%keys);
-
-die "cant read dbmtest" unless dbmopen(%rkeys, "dbmtest", undef);
-
-$i = 0;
-print "Reading...\n";
-while (($key, $val) = each %rkeys)
-{
- if ($keys{$key} != $val)
- {
- print 'Incorrect val ', $key, ' = ', $val, ' expecting ', $keys{$key}, "\n";
- $i = $i + 1;
- }
-}
-print "Done\n";
-dbmclose (%keys);
-print $i, " Error(s)\n";
-unlink "dbmtest";
diff --git a/atarist/test/gdbm.t b/atarist/test/gdbm.t
deleted file mode 100644
index 8e4a3a13b1..0000000000
--- a/atarist/test/gdbm.t
+++ /dev/null
@@ -1,101 +0,0 @@
-#!./perl
-
-#
-# based on t/op/dbm.t modified for gdbm and atariST stat() semantics
-#
-print "1..12\n";
-
-unlink <Op.dbm>;
-umask(0);
-print (dbmopen(h,'Op.dbm',0640) ? "ok 1\n" : "not ok 1\n");
-($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
- $blksize,$blocks) = stat('Op.dbm');
-print (($mode & 0770) == 0640 ? "ok 2\n" : "not ok 2\n");
-while (($key,$value) = each(h)) {
- $i++;
-}
-print (!$i ? "ok 3\n" : "not ok 3\n");
-
-$h{'goner1'} = 'snork';
-
-$h{'abc'} = 'ABC';
-$h{'def'} = 'DEF';
-$h{'jkl','mno'} = "JKL\034MNO";
-$h{'a',2,3,4,5} = join("\034",'A',2,3,4,5);
-$h{'a'} = 'A';
-$h{'b'} = 'B';
-$h{'c'} = 'C';
-$h{'d'} = 'D';
-$h{'e'} = 'E';
-$h{'f'} = 'F';
-$h{'g'} = 'G';
-$h{'h'} = 'H';
-$h{'i'} = 'I';
-
-$h{'goner2'} = 'snork';
-delete $h{'goner2'};
-
-dbmclose(h);
-print (dbmopen(h,'Op.dbm',0640) ? "ok 4\n" : "not ok 4\n");
-
-$h{'j'} = 'J';
-$h{'k'} = 'K';
-$h{'l'} = 'L';
-$h{'m'} = 'M';
-$h{'n'} = 'N';
-$h{'o'} = 'O';
-$h{'p'} = 'P';
-$h{'q'} = 'Q';
-$h{'r'} = 'R';
-$h{'s'} = 'S';
-$h{'t'} = 'T';
-$h{'u'} = 'U';
-$h{'v'} = 'V';
-$h{'w'} = 'W';
-$h{'x'} = 'X';
-$h{'y'} = 'Y';
-$h{'z'} = 'Z';
-
-$h{'goner3'} = 'snork';
-
-delete $h{'goner1'};
-delete $h{'goner3'};
-
-@keys = keys(%h);
-@values = values(%h);
-
-if ($#keys == 29 && $#values == 29) {print "ok 5\n";} else {print "not ok 5\n";}
-
-while (($key,$value) = each(h)) {
- if ($key eq $keys[$i] && $value eq $values[$i] && $key gt $value) {
- $key =~ y/a-z/A-Z/;
- $i++ if $key eq $value;
- }
-}
-
-if ($i == 30) {print "ok 6\n";} else {print "not ok 6\n";}
-
-@keys = ('blurfl', keys(h), 'dyick');
-if ($#keys == 31) {print "ok 7\n";} else {print "not ok 7\n";}
-
-$h{'foo'} = '';
-$h{''} = 'bar';
-
-# check cache overflow and numeric keys and contents
-$ok = 1;
-for ($i = 1; $i < 200; $i++) { $h{$i + 0} = $i + 0; }
-for ($i = 1; $i < 200; $i++) { $ok = 0 unless $h{$i} == $i; }
-print ($ok ? "ok 8\n" : "not ok 8\n");
-
-($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
- $blksize,$blocks) = stat('Op.dbm');
-print ($size > 0 ? "ok 9\n" : "not ok 9\n");
-
-@h{0..200} = 200..400;
-@foo = @h{0..200};
-print join(':',200..400) eq join(':',@foo) ? "ok 10\n" : "not ok 10\n";
-
-print ($h{'foo'} eq '' ? "ok 11\n" : "not ok 11\n");
-print ($h{''} eq 'bar' ? "ok 12\n" : "not ok 12\n");
-
-unlink 'Op.dbm';
diff --git a/atarist/test/glob b/atarist/test/glob
deleted file mode 100644
index c090c56b8e..0000000000
--- a/atarist/test/glob
+++ /dev/null
@@ -1,4 +0,0 @@
-while(<*.pl>)
-{
- print $_, "\n";
-}
diff --git a/atarist/test/osexample.pl b/atarist/test/osexample.pl
deleted file mode 100644
index 47bc8e2f05..0000000000
--- a/atarist/test/osexample.pl
+++ /dev/null
@@ -1,5 +0,0 @@
-require 'osbind.pl';
-
- &Cconws("Hello World\r\n");
- $str = "This is a string being printed by Fwrite Gemdos trap\r\n";
- &Fwrite(1, length($str), $str);
diff --git a/atarist/test/pi.pl b/atarist/test/pi.pl
deleted file mode 100644
index b7766bb7e3..0000000000
--- a/atarist/test/pi.pl
+++ /dev/null
@@ -1,174 +0,0 @@
-# ---------------------------------------------------------------------------
-# pi.perl computes pi (3.14...) about 5120 Digits
-#
-# W. Kebsch, July-1988 {uunet!mcvax}!unido!nixpbe!kebsch
-
-$my_name = $0;
-$version = $my_name . "-1.2";
-
-# some working parameter
-
-$smax = 5120; # max digits
-$lmax = 4; # digits per one array element
-$hmax = 10000; # one array element contains: 0..9999
-$smin = $lmax; # min digits
-$mag = 7; # magic number
-
-# subroutines
-
-sub mul_tm # multiply the tm array with a long value
-{
- $cb = pop(@_); # elements(array)
- $x = pop(@_); # value
-
- $c = 0;
- for($i = 1; $i <= $cb; $i++)
- {
- $z = $tm[$i] * $x + $c;
- $c = int($z / $hmax);
- $tm[$i] = $z - $c * $hmax;
- }
-}
-
-sub mul_pm # multiply the pm array with a long value
-{
- $cb = pop(@_); # elements(array)
- $x = pop(@_); # value
-
- $c = 0;
- for($i = 1; $i <= $cb; $i++)
- {
- $z = $pm[$i] * $x + $c;
- $c = int($z / $hmax);
- $pm[$i] = $z - $c * $hmax;
- }
-}
-
-sub divide # divide the tm array by a long value
-{
- $cb = pop(@_); # elements(array)
- $x = pop(@_); # value
-
- $c = 0;
- for($i = $cb; $i >= 1; $i--)
- {
- $z = $tm[$i] + $c;
- $q = int($z / $x);
- $tm[$i] = $q;
- $c = ($z - $q * $x) * $hmax;
- }
-}
-
-sub add # add tm array to pm array
-{
- $cb = pop(@_); # elements(array)
-
- $c = 0;
- for($i = 1; $i <= $cb; $i++)
- {
- $z = $pm[$i] + $tm[$i] + $c;
- if($z >= $hmax)
- {
- $pm[$i] = $z - $hmax;
- $c = 1;
- }
- else
- {
- $pm[$i] = $z;
- $c = 0;
- }
- }
-}
-
-$m0 = 0; $m1 = 0; $m2 = 0;
-
-sub check_xb # reduce current no. of elements (speed up!)
-{
- $cb = pop(@_); # current no. of elements
-
- if(($pm[$cb] == $m0) && ($pm[$cb - 1] == $m1) && ($pm[$cb - 2] == $m2))
- {
- $cb--;
- }
- $m0 = $pm[$cb];
- $m1 = $pm[$cb - 1];
- $m2 = $pm[$cb - 2];
- $cb;
-}
-
-sub display # show the result
-{
- $cb = pop(@_); # elements(array);
-
- printf("\n%3d.", $pm[$cb]);
- $j = $mag - $lmax;
- for($i = $cb - 1; $i >= $j; $i--)
- {
- printf(" %04d", $pm[$i]);
- }
- print "\n";
-}
-
-sub the_job # let's do the job
-{
- $s = pop(@_); # no. of digits
-
- $s = int(($s + $lmax - 1) / $lmax) * $lmax;
- $b = int($s / $lmax) + $mag - $lmax;
- $xb = $b;
- $t = int($s * 5 / 3);
-
- for($i = 1; $i <= $b; $i++) # init arrays
- {
- $pm[$i] = 0;
- $tm[$i] = 0;
- }
- $pm[$b - 1] = $hmax / 2;
- $tm[$b - 1] = $hmax / 2;
-
- printf("digits:%5d, terms:%5d, elements:%5d\n", $s, $t, $b);
- for($n = 1; $n <= $t; $n++)
- {
- printf("\r\t\t\t term:%5d", $n);
- if($n < 200)
- {
- do mul_tm((4 * ($n * $n - $n) + 1), $xb);
- }
- else
- {
- do mul_tm((2 * $n - 1), $xb);
- do mul_tm((2 * $n - 1), $xb);
- }
- if($n < 100)
- {
- do divide(($n * (16 * $n + 8)), $xb);
- }
- else
- {
- do divide((8 * $n), $xb);
- do divide((2 * $n + 1), $xb);
- }
- do add($xb);
- if($xb > $mag)
- {
- $xb = do check_xb($xb);
- }
- }
- do mul_pm(6, $b);
- do display($b);
- ($user,$sys,$cuser,$csys) = times;
- printf("\n[u=%g s=%g cu=%g cs=%g]\n",$user, $sys, $cuser, $csys);
-}
-
-# main block ----------------------------------------------------------------
-
-$no_of_args = $#ARGV + 1;
-print("$version, ");
-die("usage: $my_name <no. of digits>") unless($no_of_args == 1);
-$digits = int($ARGV[0]);
-die("no. of digits out of range [$smin\..$smax]")
- unless(($digits >= $smin) && ($digits <= $smax));
-do the_job($digits);
-exit 0;
-
-# That's all ----------------------------------------------------------------
diff --git a/atarist/test/printenv b/atarist/test/printenv
deleted file mode 100644
index 6c2619ae49..0000000000
--- a/atarist/test/printenv
+++ /dev/null
@@ -1,16 +0,0 @@
-$exit = 0;
-$\ = "\n";
-if($#ARGV >= 0) {
- foreach (@ARGV) {
- if(defined $ENV{$_}) {
- print $ENV{$_};
- } else {
- $exit = 1;
- }
- }
-} else {
- foreach (sort keys %ENV) {
- print $_, '=', $ENV{$_};
- }
-}
-exit $exit;
diff --git a/atarist/test/readme b/atarist/test/readme
deleted file mode 100644
index 9b75f99b91..0000000000
--- a/atarist/test/readme
+++ /dev/null
@@ -1,3 +0,0 @@
-this directory contain simple tests for the atariST port. to run a test
-simply enter
- perl file
diff --git a/atarist/test/sig b/atarist/test/sig
deleted file mode 100644
index ac1b2b2fee..0000000000
--- a/atarist/test/sig
+++ /dev/null
@@ -1,12 +0,0 @@
-sub handler {
- local($sig) = @_;
- print "Caught SIG$sig\n";
- exit(0);
-}
-
-$SIG{'INT'} = 'handler';
-
-print "Hit CRTL-C to see if it is trapped\n";
-while($_ = <ARGV>) {
- print $_;
-}
diff --git a/atarist/test/tbinmode b/atarist/test/tbinmode
deleted file mode 100644
index 4cf4f7827f..0000000000
--- a/atarist/test/tbinmode
+++ /dev/null
@@ -1,12 +0,0 @@
-open(FP, ">bintest") || die "Can't open bintest for write\n";
-binmode FP;
-print FP pack("C*", 0xaa, 0x55, 0xaa, 0x55,
- 0xff, 0x0d, 0x0a);
-close FP;
-
-open(FP, "<bintest") || die "Can't open bintest for read\n";
-binmode FP;
-@got = unpack("C*", <FP>);
-close FP;
-printf "expect:\t7 elements: aa 55 aa 55 ff 0d 0a\n";
-printf "got:\t%d elements: %x %x %x %x %x %02x %02x\n", $#got+1-$[, @got;