changeset 24434:f169405c03ab

test-interactive: use stable EOL in various file generating routines The seq.py and shell echo redirected to a file ends up with platform specific EOL, which throws off the hash when the file is committed to the test repo on Windows. The other option is to glob the hashes, but the ability to see if they have changed might point out problems that would otherwise be missed.
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 21 Mar 2015 11:56:43 -0400
parents f5f4dc115fb2
children 1356086a7cf3
files tests/test-commit-interactive-curses.t tests/test-revert-interactive.t
diffstat 2 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-commit-interactive-curses.t	Tue Mar 17 15:46:36 2015 -0700
+++ b/tests/test-commit-interactive-curses.t	Sat Mar 21 11:56:43 2015 -0400
@@ -45,7 +45,7 @@
 Committing only one file
 
   $ echo "a" >> a
-  $ python $TESTDIR/seq.py 1 10 > b
+  >>> open('b', 'wb').write("1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n")
   $ hg add b
   $ cat <<EOF >testModeCommands
   > TOGGLE
--- a/tests/test-revert-interactive.t	Tue Mar 17 15:46:36 2015 -0700
+++ b/tests/test-revert-interactive.t	Sat Mar 21 11:56:43 2015 -0400
@@ -21,13 +21,17 @@
   $ mkdir -p a/folder1 a/folder2
   $ cd a
   $ hg init
-  $ python $TESTDIR/seq.py 1 5 > f ; hg add f ; hg commit -m "adding f"
+  >>> open('f', 'wb').write("1\n2\n3\n4\n5\n")
+  $ hg add f ; hg commit -m "adding f"
   $ cat f > folder1/g ; hg add folder1/g ; hg commit -m "adding folder1/g"
   $ cat f > folder2/h ; hg add folder2/h ; hg commit -m "adding folder2/h"
   $ cat f > folder1/i ; hg add folder1/i ; hg commit -m "adding folder1/i"
-  $ echo "a" > f ; python $TESTDIR/seq.py 1 5 >> f ; echo "b" >> f ; hg commit -m "modifying f"
-  $ echo "c" > folder1/g ; python $TESTDIR/seq.py 1 5 >> folder1/g ; echo "d" >> folder1/g ; hg commit -m "modifying folder1/g"
-  $ echo "e" > folder2/h ; python $TESTDIR/seq.py 1 5 >> folder2/h ; echo "f" >> folder2/h ; hg commit -m "modifying folder2/h"
+  >>> open('f', 'wb').write("a\n1\n2\n3\n4\n5\nb\n")
+  $ hg commit -m "modifying f"
+  >>> open('folder1/g', 'wb').write("c\n1\n2\n3\n4\n5\nd\n")
+  $ hg commit -m "modifying folder1/g"
+  >>> open('folder2/h', 'wb').write("e\n1\n2\n3\n4\n5\nf\n")
+  $ hg commit -m "modifying folder2/h"
   $ hg tip
   changeset:   6:59dd6e4ab63a
   tag:         tip