summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2011-03-18 12:09:54 +0100
committerJean Delvare <jdelvare@suse.de>2011-03-18 12:09:54 +0100
commit4d4b659d5f012f17a8147a3f6f7c74d4810d84a4 (patch)
tree0b137f30768dd17d2fa42a9135a72da30b29ae16
parenta9818f475db316b5cba773a335c74a4f7a2f0fcb (diff)
downloadquilt-4d4b659d5f012f17a8147a3f6f7c74d4810d84a4.tar.gz
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.
-rw-r--r--quilt.changes7
-rw-r--r--test/edit.test2
-rwxr-xr-xtest/run3
3 files changed, 9 insertions, 3 deletions
diff --git a/quilt.changes b/quilt.changes
index e9ca757..dc0a981 100644
--- a/quilt.changes
+++ b/quilt.changes
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Fri Mar 18 12:05:33 CET 2011 - jdelvare@suse.de
+
+- 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.
+
+-------------------------------------------------------------------
Fri Mar 18 11:55:17 CET 2011 - jdelvare@suse.de
- Makefile.in: Fix i18n of quilt/scripts/patchfns, broken by
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 = <SOURCE>; $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) {