commit 1792a712bfeb80ba460cb0c5345d549b125193d8
Author: coke <will@coleda.com>
Date:   Mon Mar 5 10:46:52 2012 -0500

    Respect .spec_config

diff --git a/fudge b/fudge
index 97fbda0..42d5678 100755
--- a/fudge
+++ b/fudge
@@ -10,17 +10,51 @@ while( $_ = $ARGV[0], /^-/ ) {
     $OPTS{$_} = $_;
 }
 
-my $ME = shift;
-my $IN = shift;
-my $OUT = shift;
+my $ME;  # implementation
+my $IN;  # test file
+my $OUT; # fudged file
+
+if (-f ".spec_config") {
+    open my $cf, "<", ".spec_config";
+    while (<$cf>) {
+        if (m/^\bname\b\s*=\s*(\w+)/) {
+           $ME = $1;
+        }
+    }
+}
+
+if (@ARGV == 3) {
+    # impl test fudged
+    $ME = shift;
+    $IN = shift;
+    $OUT = shift;
+} elsif (@ARGV == 1) {
+    # test
+    $IN = shift; 
+} elsif (@ARGV == 2) {
+    my $arg = shift;
+    if ($arg ~~ m/\.t$/) {
+        # test fudged
+        $IN = $arg;
+        $OUT = shift;
+    } else {
+        # impl test
+        $ME = $arg;
+        $IN = shift; 
+    }
+}
 
 if (!$OUT and $IN) {
     ($OUT = $IN) =~ s/\.t$/.$ME/ or $OUT .= ".$ME";
 }
+
 unless ($ME and $IN and $OUT) {
 
     die <<"USAGE";
-Usage: $0 [options] implname testfilename [fudgedtestfilename]
+Usage: $0 [options] [implname] testfilename [fudgedtestfilename]
+
+    implname, if not specified on the command line, is pulled from the
+        .spec_config file in your compiler's directory.
 
     Options:
     --keep-exit-code
@@ -54,7 +88,6 @@ Usage: $0 [options] implname testfilename [fudgedtestfilename]
     num is the number of statements or blocks to preprocess, defaults to 1
     count is how many tests the following construct counts as
 
-
 USAGE
 }
 unless (-e $IN) {
