Mercurial > public > mercurial-scm > hg-stable
diff tests/test-histedit-edit.t @ 17086:5f2cacb715dc
tests: make histedit tests more resilient to filesystem variation
Better quoting of odd filesystem paths and no dependency to execute bit.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Sat, 30 Jun 2012 03:34:50 +0200 |
parents | 35729bdd59b6 |
children | a79776f427b4 |
line wrap: on
line diff
--- a/tests/test-histedit-edit.t Sat Jun 30 03:34:44 2012 +0200 +++ b/tests/test-histedit-edit.t Sat Jun 30 03:34:50 2012 +0200 @@ -61,7 +61,7 @@ edit the history - $ HGEDITOR="cat $EDITED > " hg histedit 177f92b77385 2>&1 | fixbundle + $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle 0 files updated, 0 files merged, 2 files removed, 0 files unresolved abort: Make changes as needed, you may commit or record as needed now. When you are finished, run hg histedit --continue to resume. @@ -118,7 +118,7 @@ $ cat > $EDITED <<EOF > edit bf757c081cd0 f > EOF - $ HGEDITOR="cat $EDITED > " hg histedit tip 2>&1 | fixbundle + $ HGEDITOR="cat \"$EDITED\" > " hg histedit tip 2>&1 | fixbundle 0 files updated, 0 files merged, 1 files removed, 0 files unresolved abort: Make changes as needed, you may commit or record as needed now. When you are finished, run hg histedit --continue to resume. @@ -139,12 +139,10 @@ say we'll change the message, but don't. $ cat > ../edit.sh <<EOF - > #!/bin/sh - > cat \$1 | sed s/pick/mess/ > tmp - > mv tmp \$1 + > cat "\$1" | sed s/pick/mess/ > tmp + > mv tmp "\$1" > EOF - $ chmod +x ../edit.sh - $ HGEDITOR="../edit.sh" hg histedit tip 2>&1 | fixbundle + $ HGEDITOR="sh ../edit.sh" hg histedit tip 2>&1 | fixbundle 0 files updated, 0 files merged, 1 files removed, 0 files unresolved 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg status @@ -160,7 +158,7 @@ $ cat > $EDITED <<EOF > mess bf757c081cd0 f > EOF - $ HGEDITOR="cat $EDITED > " hg histedit tip 2>&1 | fixbundle + $ HGEDITOR="cat \"$EDITED\" > " hg histedit tip 2>&1 | fixbundle 0 files updated, 0 files merged, 1 files removed, 0 files unresolved 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg status