| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
SCRIPT=./tap/jdg-tap-merge-conflict |
| 4 |
|
| 5 |
KO_FILE=./tests/fixtures/merge-conflict/ko.txt |
| 6 |
KO_OUT="1..3 |
| 7 |
not ok 1 1:<<<<<<< HEAD |
| 8 |
not ok 2 3:======= |
| 9 |
not ok 3 5:>>>>>>> 47509bb6 (MT#58115 WIP)" |
| 10 |
OK_FILE=./tests/fixtures/merge-conflict/ok.txt |
| 11 |
|
| 12 |
testDetection() |
| 13 |
{ |
| 14 |
assertEquals "$($SCRIPT $KO_FILE)" "$KO_OUT" |
| 15 |
} |
| 16 |
|
| 17 |
testPass() |
| 18 |
{ |
| 19 |
assertEquals "$($SCRIPT $OK_FILE)" "" |
| 20 |
} |
| 21 |
|
| 22 |
testDir() |
| 23 |
{ |
| 24 |
assertEquals "$($SCRIPT /tmp 2>&1)" "/tmp is a directory. Ignoring." |
| 25 |
} |
| 26 |
|
| 27 |
. /usr/share/shunit2/shunit2 |
| 28 |
|
| 29 |
# vim:foldmethod=marker ts=2 ft=sh ai expandtab sw=2 |