gitignore: Add ChangeLog to .gitignore
[stgit.git] / t / t1207-push-tree.sh
blobe97cb1bc043a553ce3a5434372be8a8a4fd2b13c
1 #!/bin/sh
3 # Copyright (c) 2009 David Kågedal
6 test_description='Exercise pushing patches with --set-tree.'
8 . ./test-lib.sh
10 test_expect_success \
11 'Create initial patches' '
12 stg init &&
13 stg new A -m A &&
14 echo hello world > a &&
15 stg add a &&
16 stg refresh
17 stg new B -m B &&
18 echo HELLO WORLD > a &&
19 stg refresh
22 test_expect_success \
23 'Back up and create a partial patch' '
24 stg pop &&
25 stg new C -m C &&
26 echo hello WORLD > a &&
27 stg refresh
30 test_expect_success \
31 'Reapply patch B' '
32 stg push --set-tree B
35 test_expect_success \
36 'Compare results' '
37 stg pop -a &&
38 stg push &&
39 test "$(echo $(cat a))" = "hello world" &&
40 stg push &&
41 test "$(echo $(cat a))" = "hello WORLD" &&
42 stg push &&
43 test "$(echo $(cat a))" = "HELLO WORLD"
46 test_done