Patchwork [2,of,4,V2] tests: replace uses of 'seq' with portable 'seq.py'

login
register
mail settings
Submitter Matt Harbison
Date March 18, 2015, 2:24 a.m.
Message ID <fb47194a8e28cc4b1277.1426645485@Envy>
Download mbox | patch
Permalink /patch/8142/
State Accepted
Commit 8de8cd34f2e3710fe157f915cbf868043e4874cb
Headers show

Comments

Matt Harbison - March 18, 2015, 2:24 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1426643267 14400
#      Tue Mar 17 21:47:47 2015 -0400
# Node ID fb47194a8e28cc4b12770f04336e022cf67dd70a
# Parent  3c2b056ac2b65c57923ddd41b318f93e54b6c0fa
tests: replace uses of 'seq' with portable 'seq.py'

Patch

diff --git a/tests/test-censor.t b/tests/test-censor.t
--- a/tests/test-censor.t
+++ b/tests/test-censor.t
@@ -299,7 +299,7 @@ 
 
 Can censor after revlog has expanded to no longer permit inline storage
 
-  $ for x in `seq 0 50000`
+  $ for x in `python $TESTDIR/seq.py 0 50000`
   > do
   >   echo "Password: hunter$x" >> target
   > done
diff --git a/tests/test-commit-interactive-curses.t b/tests/test-commit-interactive-curses.t
--- a/tests/test-commit-interactive-curses.t
+++ b/tests/test-commit-interactive-curses.t
@@ -44,7 +44,7 @@ 
 Committing only one file
 
   $ echo "a" >> a
-  $ seq 1 10 > b
+  $ python $TESTDIR/seq.py 1 10 > b
   $ hg add b
   $ cat <<EOF >testModeCommands
   > TOGGLE
diff --git a/tests/test-push-warn.t b/tests/test-push-warn.t
--- a/tests/test-push-warn.t
+++ b/tests/test-push-warn.t
@@ -411,7 +411,7 @@ 
   adding c
   created new head
 
-  $ for i in `seq 3`; do hg -R h up -q 0; echo $i > h/b; hg -R h ci -qAm$i; done
+  $ for i in `python $TESTDIR/seq.py 3`; do hg -R h up -q 0; echo $i > h/b; hg -R h ci -qAm$i; done
 
   $ hg -R i push h
   pushing to h
diff --git a/tests/test-setdiscovery.t b/tests/test-setdiscovery.t
--- a/tests/test-setdiscovery.t
+++ b/tests/test-setdiscovery.t
@@ -364,9 +364,9 @@ 
 #if false
 generate new bundles:
   $ hg init r1
-  $ for i in `seq 101`; do hg -R r1 up -qr null && hg -R r1 branch -q b$i && hg -R r1 ci -qmb$i; done
+  $ for i in `python $TESTDIR/seq.py 101`; do hg -R r1 up -qr null && hg -R r1 branch -q b$i && hg -R r1 ci -qmb$i; done
   $ hg clone -q r1 r2
-  $ for i in `seq 10`; do hg -R r1 up -qr null && hg -R r1 branch -q c$i && hg -R r1 ci -qmc$i; done
+  $ for i in `python $TESTDIR/seq.py 10`; do hg -R r1 up -qr null && hg -R r1 branch -q c$i && hg -R r1 ci -qmc$i; done
   $ hg -R r2 branch -q r2change && hg -R r2 ci -qmr2change
   $ hg -R r1 bundle -qa $TESTDIR/bundles/issue4438-r1.hg
   $ hg -R r2 bundle -qa $TESTDIR/bundles/issue4438-r2.hg
diff --git a/tests/test-tools.t b/tests/test-tools.t
--- a/tests/test-tools.t
+++ b/tests/test-tools.t
@@ -43,7 +43,7 @@ 
   foo: mode=644
 #endif
 
-  $ seq 10 > bar
+  $ python $TESTDIR/seq.py 10 > bar
 #if unix-permissions symlink
   $ chmod +x bar
   $ f bar --newer foo --mode --type --size --dump --links --bytes 7