equal
deleted
inserted
replaced
|
1 #!/bin/sh |
|
2 |
|
3 cp "$TESTDIR"/../contrib/simplemerge . |
|
4 |
|
5 echo base > base |
|
6 |
|
7 echo local > local |
|
8 cat base >> local |
|
9 cp local orig |
|
10 |
|
11 cat base > other |
|
12 echo other >> other |
|
13 |
|
14 echo '% changing local directly' |
|
15 python simplemerge local base other && echo "merge succeeded" |
|
16 cat local |
|
17 cp orig local |
|
18 |
|
19 echo '% printing to stdout' |
|
20 python simplemerge -p local base other |
|
21 echo ' local:' |
|
22 cat local |
|
23 |
|
24 echo '% conflicts' |
|
25 cp base conflict-local |
|
26 cp other conflict-other |
|
27 echo not other >> conflict-local |
|
28 echo end >> conflict-local |
|
29 echo end >> conflict-other |
|
30 python simplemerge -p conflict-local base conflict-other || echo "merge failed" |
|
31 |
|
32 echo '% --no-minimal' |
|
33 python simplemerge -p --no-minimal conflict-local base conflict-other |
|
34 |
|
35 echo '% 1 label' |
|
36 python simplemerge -p -L foo conflict-local base conflict-other |
|
37 |
|
38 echo '% 2 labels' |
|
39 python simplemerge -p -L foo -L bar conflict-local base conflict-other |
|
40 |
|
41 echo '% too many labels' |
|
42 python simplemerge -p -L foo -L bar -L baz conflict-local base conflict-other |
|
43 |
|
44 echo '% binary file' |
|
45 printf '\x00' > binary-local |
|
46 cat orig >> binary-local |
|
47 python simplemerge -p binary-local base other |
|
48 |
|
49 echo '% binary file --text' |
|
50 python simplemerge -a -p binary-local base other |
|
51 |
|
52 echo '% help' |
|
53 python simplemerge --help |
|
54 |
|
55 echo '% wrong number of arguments' |
|
56 python simplemerge |
|
57 |
|
58 echo '% bad option' |
|
59 python simplemerge --foo -p local base other |
|
60 |
|
61 exit 0 |