~ubuntu-branches/ubuntu/lucid/guilt/lucid

« back to all changes in this revision

Viewing changes to regression/060-files.sh

  • Committer: Bazaar Package Importer
  • Author(s): Matthew Johnson
  • Date: 2008-08-24 11:34:50 UTC
  • mfrom: (3.1.5 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080824113450-723jxmcg8hxmbd6p
Tags: 0.30-1.1
* Non-maintainer upload.
* Fix bashism in guilt-patchbomb 
  (added debian/patches/bashisms) (Closes: #489606)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#
2
 
# Test the series parsing code
3
 
#
4
 
 
5
 
source scaffold
6
 
source generic_test_data
7
 
 
8
 
# the test itself
9
 
empty_repo
10
 
cd $REPODIR
11
 
guilt-init
12
 
 
13
 
generic_prepare_for_tests
14
 
 
15
 
# create a patch that contains a file in a subdirectory
16
 
guilt-new subdir
17
 
mkdir blah
18
 
touch blah/sub
19
 
guilt-add blah/sub
20
 
guilt-refresh
21
 
 
22
 
function expected_files
23
 
{
24
 
        echo "def"
25
 
}
26
 
 
27
 
function expected_files_label
28
 
{
29
 
        echo "mode def"
30
 
}
31
 
 
32
 
function expected_files_verbose_label
33
 
{
34
 
        echo "[mode] def"
35
 
}
36
 
 
37
 
function expected_files_all
38
 
{
39
 
        echo "blah/sub"
40
 
        echo "def"
41
 
        echo "abd"
42
 
        echo "abd"
43
 
        echo "def"
44
 
}
45
 
 
46
 
function expected_files_label_all
47
 
{
48
 
        echo "subdir blah/sub"
49
 
        echo "modify def"
50
 
        echo "add abd"
51
 
        echo "remove abd"
52
 
        echo "mode def"
53
 
}
54
 
 
55
 
function expected_files_verbose_all
56
 
{
57
 
        echo "subdir"
58
 
        echo "+ blah/sub"
59
 
        echo "modify"
60
 
        echo "  def"
61
 
        echo "add"
62
 
        echo "+ abd"
63
 
        echo "remove"
64
 
        echo "- abd"
65
 
        echo "mode"
66
 
        echo "  def"
67
 
}
68
 
 
69
 
function expected_files_verbose_label_all
70
 
{
71
 
        echo "[subdir] blah/sub"
72
 
        echo "[modify] def"
73
 
        echo "[add] abd"
74
 
        echo "[remove] abd"
75
 
        echo "[mode] def"
76
 
 
77
 
}
78
 
 
79
 
# push em all for tesing
80
 
guilt-push -a > /dev/null
81
 
 
82
 
guilt-files > /tmp/reg.$$
83
 
expected_files | diff -u - /tmp/reg.$$
84
 
echo -n "[files] "
85
 
 
86
 
guilt-files -l > /tmp/reg.$$
87
 
expected_files_label | diff -u - /tmp/reg.$$
88
 
echo -n "[label] "
89
 
 
90
 
guilt-files -v -l > /tmp/reg.$$
91
 
expected_files_verbose_label | diff -u - /tmp/reg.$$
92
 
echo -n "[verbose label] "
93
 
 
94
 
guilt-files -a > /tmp/reg.$$
95
 
expected_files_all | diff -u - /tmp/reg.$$
96
 
echo -n "[all] "
97
 
 
98
 
guilt-files -l -a > /tmp/reg.$$
99
 
expected_files_label_all | diff -u - /tmp/reg.$$
100
 
echo -n "[label all] "
101
 
 
102
 
guilt-files -v -a > /tmp/reg.$$
103
 
expected_files_verbose_all | diff -u - /tmp/reg.$$
104
 
echo -n "[verbose all] "
105
 
 
106
 
guilt-files -v -l -a > /tmp/reg.$$
107
 
expected_files_verbose_label_all | diff -u - /tmp/reg.$$
108
 
echo -n "[verbose label all] "
109
 
 
110
 
rm -f /tmp/reg.$$
111
 
 
112
 
complete_test
113