summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2006-03-15 19:35:48 +0000
committerAndreas Gruenbacher <agruen@suse.de>2006-03-15 19:35:48 +0000
commitdac36c1bce619b0914b3ed9d15910df312af45d6 (patch)
treef9cb01988869ae66dfb841302082f708f05fa355 /test
parent2dc1ecfdd5252ba0bb05d0f7d805166532e73cc0 (diff)
downloadquilt-dac36c1bce619b0914b3ed9d15910df312af45d6.tar.gz
- quilt/edit.in: Fix for working in subdirectories.
Diffstat (limited to 'test')
-rw-r--r--test/edit.test9
-rwxr-xr-xtest/run7
2 files changed, 12 insertions, 4 deletions
diff --git a/test/edit.test b/test/edit.test
index 5cc5dba..4c4c542 100644
--- a/test/edit.test
+++ b/test/edit.test
@@ -5,16 +5,21 @@ $ cd d
$ cat > editor
< #! /bin/sh
< echo Editing $1
-< echo foo > $1
+< sed -e 's:foo:bar:' $1 > $1.new
+< mv $1.new $1
$ chmod +x editor
$ export EDITOR=%PWD/editor
$ quilt new patch
> Patch patches/patch is now on top
$ cd subdir
+$ echo foo > foo
$ quilt edit foo
> File subdir/foo added to patch ../patches/patch
-> Editing foo
+> Editing subdir/foo
+
+$ cat foo
+> bar
$ cd ../..
$ rm -rf d
diff --git a/test/run b/test/run
index dfe3256..360739e 100755
--- a/test/run
+++ b/test/run
@@ -92,8 +92,11 @@ sub process_test($$$$) {
my @good = ();
my $nmax = (@$out > @$result) ? @$out : @$result;
for (my $n=0; $n < $nmax; $n++) {
- my $use_re = ($out->[$n] =~ /^~ /);
- $out->[$n] =~ s/^~ //g;
+ my $use_re;
+ if (defined $out->[$n] && $out->[$n] =~ /^~ /) {
+ $use_re = 1;
+ $out->[$n] =~ s/^~ //g;
+ }
if (!defined($out->[$n]) || !defined($result->[$n]) ||
(!$use_re && $result->[$n] ne $out->[$n]) ||