File: t4000-upgrade.sh

package info (click to toggle)
stgit 0.19-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,748 kB
  • sloc: python: 10,558; sh: 5,739; lisp: 2,678; makefile: 142; perl: 42
file content (40 lines) | stat: -rwxr-xr-x 1,035 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh
#
# Copyright (c) 2007 Karl Hasselström
#

test_description='Make sure that we can use old StGIT repositories'

. ./test-lib.sh

for ver in 0.12 0.8; do

    tar zxf $STG_ROOT/t/t4000-upgrade/$ver.tar.gz
    cd $ver

    test_expect_success \
        "v$ver: Check the list of applied and unapplied patches" '
        [ "$(echo $(stg series --applied --noprefix))" = "p0 p1 p2" ] &&
        [ "$(echo $(stg series --unapplied --noprefix))" = "p3 p4" ]
    '

    test_expect_success \
        "v$ver: Make sure the 'description' file is no longer there" '
        [ ! -e .git/patches/master/description ] &&
        [ "$(echo $(git config branch.master.description))" = "cool branch" ]
    '

    test_expect_success \
        "v$ver: Make sure the 'current' file is no longer there" '
        [ ! -e .git/patches/master/current ]
    '

    test_expect_success \
        "v$ver: Make sure the base ref is no longer there" '
        must_fail git show-ref --verify --quiet refs/bases/master
    '

    cd ..
done

test_done