test-contrib.t
175 lines
| 3.8 KiB
| text/troff
|
Tads3Lexer
/ tests / test-contrib.t
Augie Fackler
|
r14031 | Set vars: | ||
Thomas Arendsen Hein
|
r16350 | $ CONTRIBDIR="$TESTDIR/../contrib" | ||
Augie Fackler
|
r14031 | |||
Augie Fackler
|
r14032 | Test simplemerge command: | ||
$ cp "$CONTRIBDIR/simplemerge" . | ||||
$ echo base > base | ||||
$ echo local > local | ||||
$ cat base >> local | ||||
$ cp local orig | ||||
$ cat base > other | ||||
$ echo other >> other | ||||
changing local directly | ||||
Augie Fackler
|
r33262 | $ $PYTHON simplemerge local base other && echo "merge succeeded" | ||
Augie Fackler
|
r14032 | merge succeeded | ||
$ cat local | ||||
local | ||||
base | ||||
other | ||||
$ cp orig local | ||||
printing to stdout | ||||
Augie Fackler
|
r33262 | $ $PYTHON simplemerge -p local base other | ||
Augie Fackler
|
r14032 | local | ||
base | ||||
other | ||||
local: | ||||
$ cat local | ||||
local | ||||
base | ||||
conflicts | ||||
$ cp base conflict-local | ||||
$ cp other conflict-other | ||||
$ echo not other >> conflict-local | ||||
$ echo end >> conflict-local | ||||
$ echo end >> conflict-other | ||||
Pierre-Yves David
|
r22023 | |||
Augie Fackler
|
r33262 | $ $PYTHON simplemerge -p conflict-local base conflict-other | ||
Augie Fackler
|
r14032 | base | ||
<<<<<<< conflict-local | ||||
not other | ||||
======= | ||||
other | ||||
Ryan McElroy
|
r28072 | >>>>>>> conflict-other | ||
Augie Fackler
|
r14032 | end | ||
[1] | ||||
1 label | ||||
Augie Fackler
|
r33262 | $ $PYTHON simplemerge -p -L foo conflict-local base conflict-other | ||
Augie Fackler
|
r14032 | base | ||
<<<<<<< foo | ||||
not other | ||||
======= | ||||
other | ||||
Ryan McElroy
|
r28072 | >>>>>>> conflict-other | ||
Pierre-Yves David
|
r22023 | end | ||
Augie Fackler
|
r14032 | [1] | ||
2 labels | ||||
Augie Fackler
|
r33262 | $ $PYTHON simplemerge -p -L foo -L bar conflict-local base conflict-other | ||
Augie Fackler
|
r14032 | base | ||
<<<<<<< foo | ||||
not other | ||||
======= | ||||
other | ||||
Ryan McElroy
|
r28072 | >>>>>>> bar | ||
Pierre-Yves David
|
r22023 | end | ||
Augie Fackler
|
r14032 | [1] | ||
Pierre-Yves David
|
r22024 | 3 labels | ||
Augie Fackler
|
r33262 | $ $PYTHON simplemerge -p -L foo -L bar -L base conflict-local base conflict-other | ||
Pierre-Yves David
|
r22024 | base | ||
<<<<<<< foo | ||||
not other | ||||
end | ||||
||||||| base | ||||
======= | ||||
other | ||||
end | ||||
>>>>>>> bar | ||||
[1] | ||||
Augie Fackler
|
r14032 | too many labels | ||
Augie Fackler
|
r33262 | $ $PYTHON simplemerge -p -L foo -L bar -L baz -L buz conflict-local base conflict-other | ||
Pierre-Yves David
|
r22024 | abort: can only specify three labels. | ||
Augie Fackler
|
r14032 | [255] | ||
binary file | ||||
Pulkit Goyal
|
r36048 | $ $PYTHON -c "f = open('binary-local', 'w'); f.write('\x00'); f.close()" | ||
Augie Fackler
|
r14032 | $ cat orig >> binary-local | ||
Augie Fackler
|
r33262 | $ $PYTHON simplemerge -p binary-local base other | ||
Sune Foldager
|
r14330 | warning: binary-local looks like a binary file. | ||
[1] | ||||
Augie Fackler
|
r14032 | |||
binary file --text | ||||
Augie Fackler
|
r33262 | $ $PYTHON simplemerge -a -p binary-local base other 2>&1 | ||
Augie Fackler
|
r14032 | warning: binary-local looks like a binary file. | ||
\x00local (esc) | ||||
base | ||||
other | ||||
help | ||||
Augie Fackler
|
r33262 | $ $PYTHON simplemerge --help | ||
Augie Fackler
|
r14032 | simplemerge [OPTS] LOCAL BASE OTHER | ||
Simple three-way file merge utility with a minimal feature set. | ||||
Apply to LOCAL the changes necessary to go from BASE to OTHER. | ||||
By default, LOCAL is overwritten with the results of this operation. | ||||
options: | ||||
-L --label labels to use on conflict markers | ||||
-a --text treat all files as text | ||||
-p --print print results instead of overwriting LOCAL | ||||
Pierre-Yves David
|
r22023 | --no-minimal no effect (DEPRECATED) | ||
Augie Fackler
|
r14032 | -h --help display help and exit | ||
-q --quiet suppress output | ||||
wrong number of arguments | ||||
Augie Fackler
|
r33262 | $ $PYTHON simplemerge | ||
Augie Fackler
|
r14032 | simplemerge: wrong number of arguments | ||
simplemerge [OPTS] LOCAL BASE OTHER | ||||
Simple three-way file merge utility with a minimal feature set. | ||||
Apply to LOCAL the changes necessary to go from BASE to OTHER. | ||||
By default, LOCAL is overwritten with the results of this operation. | ||||
options: | ||||
-L --label labels to use on conflict markers | ||||
-a --text treat all files as text | ||||
-p --print print results instead of overwriting LOCAL | ||||
Pierre-Yves David
|
r22023 | --no-minimal no effect (DEPRECATED) | ||
Augie Fackler
|
r14032 | -h --help display help and exit | ||
-q --quiet suppress output | ||||
[1] | ||||
bad option | ||||
Augie Fackler
|
r33262 | $ $PYTHON simplemerge --foo -p local base other | ||
Augie Fackler
|
r14032 | simplemerge: option --foo not recognized | ||
simplemerge [OPTS] LOCAL BASE OTHER | ||||
Simple three-way file merge utility with a minimal feature set. | ||||
Apply to LOCAL the changes necessary to go from BASE to OTHER. | ||||
By default, LOCAL is overwritten with the results of this operation. | ||||
options: | ||||
-L --label labels to use on conflict markers | ||||
-a --text treat all files as text | ||||
-p --print print results instead of overwriting LOCAL | ||||
Pierre-Yves David
|
r22023 | --no-minimal no effect (DEPRECATED) | ||
Augie Fackler
|
r14032 | -h --help display help and exit | ||
-q --quiet suppress output | ||||
[1] | ||||