3
# Simple shell-based tests for bzr.
 
 
5
# This is meant to exercise the external behaviour, command line
 
 
6
# parsing and similar things and compliment the inwardly-turned
 
 
7
# testing done by doctest.
 
 
9
# This must already exist and be in the right place
 
 
10
if ! [ -d bzr-test.tmp ] 
 
 
12
    echo "please create bzr-test.tmp"
 
 
26
# some information commands
 
 
30
# invalid commands are detected
 
 
33
# some experiments with renames
 
 
35
echo "hello world" > test.txt
 
 
38
# should be the only unknown file
 
 
39
[ "`bzr unknowns`" = test.txt ]
 
 
41
# can't rename unversioned files; use the regular unix rename command
 
 
42
! bzr rename test.txt new-test.txt
 
 
44
# ok, so now add it and see what happens
 
 
46
[ -z "`bzr unknowns`" ]
 
 
48
# after adding even before committing you can rename files
 
 
49
bzr rename test.txt newname.txt
 
 
50
[ "`bzr status`" = "A       newname.txt" ]
 
 
52
bzr commit -m "add first revision"
 
 
54
# now more complicated renames
 
 
56
! bzr rename newname.txt sub1
 
 
57
! bzr rename newname.txt sub1/foo.txt
 
 
59
! bzr rename newname.txt sub1
 
 
61
bzr rename newname.txt sub1/foo.txt
 
 
65
bzr rename sub1/foo.txt newname.txt
 
 
68
bzr rename newname.txt sub1/foo.txt
 
 
69
bzr rename sub1/foo.txt sub1/bar.txt
 
 
74
bzr rename bar.txt sub2/bar.txt
 
 
76
bzr rename bar.txt ../../bar.txt
 
 
79
bzr commit -m "more renames"
 
 
81
! bzr rename sub1 sub1/knotted-up