chiark / gitweb /
Infrastructure: Switch testing over to Autotest.
[mLib] / struct / sym-ref
diff --git a/struct/sym-ref b/struct/sym-ref
deleted file mode 100755 (executable)
index c0a4622..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#! /usr/bin/perl
-#
-# Reference implementation for symbol table testing.
-
-%a = ();
-while (<>) {
-  chomp();
-  @F = split();
-  if ($F[0] eq "set") {
-    $a{$F[1]} = $F[2];
-  } elsif ($F[0] eq "get") {
-    if (exists($a{$F[1]})) {
-      print "$a{$F[1]}\n";
-    } else {
-      print "*MISSING*\n";
-    }
-  } elsif ($F[0] eq "del") {
-    if (exists($a{$F[1]})) {
-      delete($a{$F[1]});
-    } else {
-      print "*MISSING*\n";
-    }
-  } elsif ($F[0] eq "count") {
-    print int(keys(%a)), "\n";
-  } elsif ($F[0] eq "show") {
-    if (!%a) {
-      print "*EMPTY*\n";
-    } else {
-      my $s = "";
-      foreach $k (sort(keys(%a))) {
-       print "$s$k:$a{$k}";
-       $s = " ";
-      }
-      print "\n";
-    }
-  } else {
-    print "*BAD*\n";
-  }
-}
-