2 # Copyright (c) 2006 Karl Hasselström
3 test_description
='Test the assimilate command.'
7 'Assimilate in a non-initialized repository' \
11 'Initialize the StGIT repository' \
15 'Assimilate in a repository without patches' \
28 'Assimilate when there is nothing to do' \
32 'Create a GIT commit' \
40 'Assimilate one GIT commit' \
42 [ $(stg applied | wc -l) -eq 1 ] &&
44 [ $(stg applied | wc -l) -eq 2 ]
48 'Create three more GIT commits' \
50 echo one > numbers.txt &&
51 git add numbers.txt &&
52 git commit -a -m one &&
53 echo two >> numbers.txt &&
54 git commit -a -m two &&
55 echo three >> numbers.txt &&
56 git commit -a -m three
60 'Assimilate three GIT commits' \
62 [ $(stg applied | wc -l) -eq 2 ] &&
64 [ $(stg applied | wc -l) -eq 5 ]
68 'Create a mege commit' \
70 git checkout -b br master^^ &&
71 echo woof > woof.txt &&
73 git commit -a -m woof &&
74 git checkout master &&
79 'Try (and fail) to assimilate the merge commit' \
81 [ $(stg applied | wc -l) -eq 5 ] &&
83 [ $(stg applied | wc -l) -eq 5 ]