chiark / gitweb /
remove ~-files
[chiark-utils.git] / cprogs / really.testcases~
diff --git a/cprogs/really.testcases~ b/cprogs/really.testcases~
deleted file mode 100755 (executable)
index b16758d..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-#!/usr/bin/perl
-
-$testuser=   'testac';
-$testgroup=  'testac';
-$testuid=    1000;
-$testgid=    1000;
-@testxgids=  qw(1000);
-$numgid=     50008;
-$othergroup= 'daemon';
-$othergid=   1;
-
-$tests= <<END;
--u $testuser
-$testuid $testgid @testxgids
-
--u $testuser -z
-ERROR
-
--u $testuser -g $othergroup
-$testuid $othergid @testxgids $othergid
-
--u $testuser -z -g $othergroup
-$testuid $othergid $othergid
-
--u $testuser -G $numgid -g $othergroup
-$testuid $numgid @testxgids $numgid $othergid
-
--u $testuser -z -G $numgid -g $othergroup
-$testuid $numgid $numgid $othergid
-
--u $testuser -g $testgroup -G $testgid
-$testuid $testgid @testxgids
-
--u $testuser -z -g $testgroup -G $testgid
-$testuid $testgid @testxgids
-
--u $testuser -g $othergroup -g $testgroup -G $testgid
-$testuid $othergid @testxgids $othergid
-
--u $testuser -z -g $othergroup -g $testgroup -G $testgid
-$testuid $othergid $othergid
-
--u $testuser -G $numgid -g $othergroup -g $testgroup -G $testgid
-$testuid $numgid @testxgids $numgid $othergid
-
--u $testuser -z -G $numgid -g $othergroup -g $testgroup -G $testgid
-$testuid $numgid $numgid $othergid
-
-
-0 $orggid @orgxgids
-
--z
-ERROR
-
--g $othergroup
-$orguid $othergid $othergid @orgxgids
-
--z -g $othergroup
-$orguid $othergid $othergid
-
--G $numgid -g $othergroup
-$orguid $numgid $numgid $othergid @orgxgids
-
--z -G $numgid -g $othergroup
-$orguid $numgid $numgid $othergid
-
--g $orggroup -G $orggid
-$orguid $orggid @orgxgids
-
--z -g $orggroup -G $orggid
-$orguid $orggid $orggid
-
--g $othergroup -g $orggroup -G $orggid
-$orguid $othergid $othergid @orgxgids
-
--z -g $othergroup -g $orggroup -G $orggid
-$orguid $othergid $othergid $orggid
-
--G $numgid -g $othergroup -g $orggroup -G $orggid
-$orguid $numgid $numgid $othergid @orgxgids
-
--z -G $numgid -g $othergroup -g $orggroup -G $orggid
-$orguid $numgid $numgid $othergid
-END
-
-sub parseid ($) {
-    my ($id) = @_;
-    my $orgid= $id;
-    my $out= '';
-    my $part;
-    chomp($id);
-    $id =~ s/^uid=(\d+)// or return $orgid;
-    $out= $1;
-    $id =~ s/^\([^\)]+\)//; $id =~ s/^\s+// or return $orgid;
-    $id =~ s/^gid=(\d+)// or return $orgid;
-    $out.= " $1";
-    $id =~ s/^\([^\)]+\)//; $id =~ s/^\s+// or return $orgid;
-    $id =~ s/^groups=// or return $orgid;
-    for $part (split(/,/,$id)) {
-        $part =~ s/^(\d+)// or return $orgid;
-        $out.= " $1";
-        $part =~ s/^\([^\)]+\)//; $part eq '' or return $orgid;
-    }
-    return $out;
-}
-
-$org= `id`;
-$org =~ m/^uid=\d+\(([^\)]+)\) gid=\d+\(([^\)]+)\) / or die "$org ?";
-$orguser= $1; $orggroup= $2;
-$org= parseid($org);
-$org =~ m/^\d+ \d+ / or die $org;
-($orguid,$orggid,$orgxgids)= split(/ /,$org);
-
-@tests= split(/\n/,$tests);
-for ($i=0; $i<$#tests; $i+=3) {
-    $tests[$i+2] =~ m/\S/ and die "$tests[$i+2] $i";
-    $out= `./really-test $tests[$i] id`;
-    $newout= parseid($out);
-    next if $newout eq $tests[$i+1];
-    die "$newout ~= $tests[$i+1] ($tests[$i]) $i";
-}