~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to test.sh

  • Committer: mbp at sourcefrog
  • Date: 2005-04-06 02:20:40 UTC
  • Revision ID: mbp@sourcefrog.net-20050406022039-dfbff590495c81193a32fd8b
- better output from test.sh- test.sh exercises cat command (currently broken)

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
rm -rf bzr-test.tmp
17
17
mkdir bzr-test.tmp
18
18
 
 
19
# save it for real errors
 
20
exec 3>&2
 
21
 
19
22
exec > bzr-test.log
20
23
exec 2>&1 
21
24
set -x
22
25
 
 
26
quitter() {
 
27
    echo "tests failed, look in bzr-test.log" >&3; exit 2; 
 
28
}
 
29
 
 
30
trap quitter ERR
 
31
 
23
32
cd bzr-test.tmp 
24
33
rm -rf .bzr
25
34
 
49
58
bzr rename test.txt newname.txt
50
59
[ "`bzr status`" = "A       newname.txt" ]
51
60
 
 
61
[ `bzr revno` = 0 ]
52
62
bzr commit -m "add first revision"
 
63
[ `bzr revno` = 1 ]
53
64
 
54
65
# now more complicated renames
55
66
mkdir sub1
77
88
cd ../../
78
89
 
79
90
bzr commit -m "more renames"
 
91
[ `bzr revno` = 2 ] 
 
92
 
 
93
# now try pulling that file back out, checking it was stored properly
 
94
[ "`bzr cat -r 1 newname.txt`" = "hello world" ]
80
95
 
81
96
! bzr rename sub1 sub1/knotted-up
82
97