comparison tests/test-extdiff @ 10775:c52057614c72 stable

Tests with spaces in paths This allows most tests to succeed with ./run-tests.py --tmpdir='/tmp/hg test' and introduces other tests for spaces and shell quoting
author Mads Kiilerich <mads@kiilerich.com>
date Wed, 24 Mar 2010 01:43:24 +0100
parents 6045a8c4dbbc
children
comparison
equal deleted inserted replaced
10772:1e819576e926 10775:c52057614c72
34 hg ci -m "new branch" -d '1 0' 34 hg ci -m "new branch" -d '1 0'
35 hg merge 1 35 hg merge 1
36 # should diff cloned file against wc file 36 # should diff cloned file against wc file
37 hg falabala > out 37 hg falabala > out
38 # cleanup the output since the wc is a tmp directory 38 # cleanup the output since the wc is a tmp directory
39 sed 's:\(.* \).*\(\/test-extdiff\):\1[tmp]\2:' out 39 sed 's:\(diffing [^ ]* \).*\(\/test-extdiff\):\1[tmp]\2:' out
40 # test --change option 40 # test --change option
41 hg ci -d '2 0' -mtest3 41 hg ci -d '2 0' -mtest3
42 hg falabala -c 1 42 hg falabala -c 1
43 # check diff are made from the first parent 43 # check diff are made from the first parent
44 hg falabala -c 3 || echo "diff-like tools yield a non-zero exit code" 44 hg falabala -c 3 || echo "diff-like tools yield a non-zero exit code"
52 chmod +x b 52 chmod +x b
53 echo '% diff in working directory, before' 53 echo '% diff in working directory, before'
54 hg diff --git 54 hg diff --git
55 echo '% edit with extdiff -p' 55 echo '% edit with extdiff -p'
56 # prepare custom diff/edit tool 56 # prepare custom diff/edit tool
57 cat > differ.py << EOT 57 cat > 'diff tool.py' << EOT
58 #!/usr/bin/env python 58 #!/usr/bin/env python
59 import time 59 import time
60 time.sleep(1) # avoid unchanged-timestamp problems 60 time.sleep(1) # avoid unchanged-timestamp problems
61 file('a/a', 'ab').write('edited\n') 61 file('a/a', 'ab').write('edited\n')
62 file('a/b', 'ab').write('edited\n') 62 file('a/b', 'ab').write('edited\n')
63 EOT 63 EOT
64 chmod +x differ.py 64 chmod +x 'diff tool.py'
65 hg extdiff -p `pwd`/differ.py # will change to /tmp/extdiff.TMP and populate directories a.TMP and a and start tool 65 hg extdiff -p "`pwd`/diff tool.py" # will change to /tmp/extdiff.TMP and populate directories a.TMP and a and start tool
66 echo '% diff in working directory, after' 66 echo '% diff in working directory, after'
67 hg diff --git 67 hg diff --git
68 68
69 echo 69 echo
70 echo % test extdiff with --option 70 echo % test extdiff with --option