summaryrefslogtreecommitdiff
path: root/tests/Fetish.pm
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-12-02 09:30:41 +0000
committerJim Meyering <jim@meyering.net>2002-12-02 09:30:41 +0000
commit19b3648d1565af8cb838f5ce058d86e9b4ed8ef2 (patch)
treed07e16ec4816eb982bfe4f4b5849ff460d1c18ee /tests/Fetish.pm
parent7570cb86a6787dbbc1ab750e19581a2186012302 (diff)
downloadcoreutils-19b3648d1565af8cb838f5ce058d86e9b4ed8ef2.tar.xz
(_at_replace): Do the substitution only if there's something to replace.
Diffstat (limited to 'tests/Fetish.pm')
-rw-r--r--tests/Fetish.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/Fetish.pm b/tests/Fetish.pm
index cdd09fa18..f063de54b 100644
--- a/tests/Fetish.pm
+++ b/tests/Fetish.pm
@@ -12,7 +12,7 @@ use FileHandle;
use File::Compare qw(compare);
@ISA = qw(Exporter);
-($VERSION = '$Revision: 1.11 $ ') =~ tr/[0-9].//cd;
+($VERSION = '$Revision: 1.12 $ ') =~ tr/[0-9].//cd;
@EXPORT = qw (run_tests);
my $debug = $ENV{DEBUG};
@@ -168,7 +168,9 @@ sub _at_replace ($$)
foreach my $eo (qw (AUX OUT ERR))
{
my $f = $map->{$eo};
- $f and $s =~ s/\@$eo\@/$f/g;
+ $f
+ and $s =~ /\@$eo\@/
+ and $s =~ s/\@$eo\@/$f/g;
}
return $s;
}