From 4d4b659d5f012f17a8147a3f6f7c74d4810d84a4 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Fri, 18 Mar 2011 12:09:54 +0100 Subject: test/run: Enforce single variable substitution method There is no need to have two ways to access environment variables from test cases, one is enough. --- test/edit.test | 2 +- test/run | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/edit.test b/test/edit.test index 1c0c500..eb38b7a 100644 --- a/test/edit.test +++ b/test/edit.test @@ -6,7 +6,7 @@ $ cat > editor < sed -e 's:foo:bar:' $1 > $1.new < mv $1.new $1 $ chmod +x editor -$ export EDITOR=%PWD/editor +$ export EDITOR=%{PWD}/editor $ quilt new patch > Patch patches/patch is now on top diff --git a/test/run b/test/run index 0ed950e..85acb0e 100755 --- a/test/run +++ b/test/run @@ -83,8 +83,7 @@ if (defined $ARGV[0]) { for (;;) { my $line = ; $lineno++; if (defined $line) { - # Substitute %VAR and %{VAR} with environment variables. - $line =~ s[%(\w+)][$ENV{$1}]eg; + # Substitute %{VAR} with environment variables. $line =~ s[%{(\w+)}][$ENV{$1}]eg; } if (defined $line) { -- cgit