Release 0.14.1
[stgit.git] / t / t4000-upgrade.sh
blob8a308fbf7ef53b24fa1ad0cbfbe5a6c04ad75cbd
1 #!/bin/sh
3 # Copyright (c) 2007 Karl Hasselström
6 test_description='Make sure that we can use old StGIT repositories'
8 . ./test-lib.sh
10 for ver in 0.12 0.8; do
12 tar zxf ../t4000-upgrade/$ver.tar.gz
13 cd $ver
15 test_expect_success \
16 "v$ver: Check the list of applied and unapplied patches" '
17 [ "$(echo $(stg applied))" = "p0 p1 p2" ] &&
18 [ "$(echo $(stg unapplied))" = "p3 p4" ]
21 test_expect_success \
22 "v$ver: Make sure the 'description' file is no longer there" '
23 [ ! -e .git/patches/master/description ] &&
24 [ "$(echo $(git config branch.master.description))" = "cool branch" ]
27 test_expect_success \
28 "v$ver: Make sure the 'current' file is no longer there" '
29 [ ! -e .git/patches/master/current ]
32 test_expect_success \
33 "v$ver: Make sure the base ref is no longer there" '
34 ! git show-ref --verify --quiet refs/bases/master
37 cd ..
38 done
40 test_done