Skip to content
Snippets Groups Projects
Commit cf0f3cb8 authored by kiilerix's avatar kiilerix
Browse files

tests: don't use stdout redirection for test data

Stdout redirection is not binary safe everywhere - for example not on windows
with msys.
parent 117f9190
No related merge requests found
......@@ -10,7 +10,7 @@
Create a non-inlined filelog:
$ python -c 'for x in range(10000): print x' >> data1
$ python -c 'file("data1", "wb").write("".join("%s\n" % x for x in range(10000)))'
$ for j in 0 1 2 3 4 5 6 7 8 9; do
> cat data1 >> b
> hg commit -m test
......
$ hg init
$ python -c 'print "confuse str.splitlines\nembedded\rnewline"' > a
$ python -c 'file("a", "wb").write("confuse str.splitlines\nembedded\rnewline\n")'
$ hg ci -Ama -d '1 0'
adding a
......
......@@ -233,7 +233,7 @@
> msg.set_payload('email commit message\n' + patch)
> msg['Subject'] = 'email patch'
> msg['From'] = 'email patcher'
> sys.stdout.write(msg.as_string())
> file(sys.argv[2], 'wb').write(msg.as_string())
> EOF
......@@ -246,7 +246,7 @@
added 1 changesets with 2 changes to 2 files
updating to branch default
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ python mkmsg.py diffed-tip.patch > msg.patch
$ python mkmsg.py diffed-tip.patch msg.patch
$ hg --cwd b import ../msg.patch
applying ../msg.patch
$ hg --cwd b tip | grep email
......@@ -308,7 +308,8 @@
added 1 changesets with 2 changes to 2 files
updating to branch default
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ python mkmsg.py exported-tip.patch | hg --cwd b import -
$ python mkmsg.py exported-tip.patch msg.patch
$ cat msg.patch | hg --cwd b import -
applying patch from stdin
$ hg --cwd b tip | grep second
summary: second change
......@@ -325,7 +326,7 @@
> msg.set_payload('email patch\n\nnext line\n---\n' + patch)
> msg['Subject'] = '[PATCH] email patch'
> msg['From'] = 'email patcher'
> sys.stdout.write(msg.as_string())
> file(sys.argv[2], 'wb').write(msg.as_string())
> EOF
......@@ -338,7 +339,8 @@
added 1 changesets with 2 changes to 2 files
updating to branch default
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ python mkmsg2.py diffed-tip.patch | hg --cwd b import -
$ python mkmsg2.py diffed-tip.patch msg.patch
$ cat msg.patch | hg --cwd b import -
applying patch from stdin
$ hg --cwd b tip --template '{desc}\n'
email patch
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment