##// END OF EJS Templates
hgweb: all protocol functions have become generators...
hgweb: all protocol functions have become generators Using the write() callable supplied by the start_response() call is frowned upon by the WSGI spec, returning an iterable over the content chunks is the recommended way. Be aware, though: returning many small chunks will slow down responses, because the server has to flush each chunk separately.

File last commit:

r4367:c6413f8f default
r6784:18c429ea default
Show More
test-simplemerge-cmd
61 lines | 1.4 KiB | text/plain | TextLexer
/ tests / test-simplemerge-cmd
Alexis S. L. Carvalho
polish the simplemerge command; add a test
r4364 #!/bin/sh
cp "$TESTDIR"/../contrib/simplemerge .
echo base > base
echo local > local
cat base >> local
cp local orig
cat base > other
echo other >> other
echo '% changing local directly'
python simplemerge local base other && echo "merge succeeded"
cat local
cp orig local
echo '% printing to stdout'
python simplemerge -p local base other
echo ' local:'
cat local
echo '% conflicts'
cp base conflict-local
cp other conflict-other
echo not other >> conflict-local
echo end >> conflict-local
echo end >> conflict-other
python simplemerge -p conflict-local base conflict-other || echo "merge failed"
echo '% --no-minimal'
python simplemerge -p --no-minimal conflict-local base conflict-other
echo '% 1 label'
python simplemerge -p -L foo conflict-local base conflict-other
echo '% 2 labels'
python simplemerge -p -L foo -L bar conflict-local base conflict-other
echo '% too many labels'
python simplemerge -p -L foo -L bar -L baz conflict-local base conflict-other
echo '% binary file'
Thomas Arendsen Hein
Use python instead of shell printf with \x for test-simplemerge-cmd...
r4367 python -c "f = file('binary-local', 'w'); f.write('\x00'); f.close()"
Alexis S. L. Carvalho
polish the simplemerge command; add a test
r4364 cat orig >> binary-local
python simplemerge -p binary-local base other
echo '% binary file --text'
python simplemerge -a -p binary-local base other
echo '% help'
python simplemerge --help
echo '% wrong number of arguments'
python simplemerge
echo '% bad option'
python simplemerge --foo -p local base other
exit 0