OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Check that we're able to submit from a directory that doesn't exist on the | 3 # Check that we're able to submit from a directory that doesn't exist on the |
4 # trunk. This tests for a previous bug where we ended up with an invalid CWD | 4 # trunk. This tests for a previous bug where we ended up with an invalid CWD |
5 # after switching to the merge branch. | 5 # after switching to the merge branch. |
6 | 6 |
7 set -e | 7 set -e |
8 | 8 |
9 . ./test-lib.sh | 9 . ./test-lib.sh |
10 | 10 |
11 setup_initsvn | 11 setup_initsvn |
12 setup_gitsvn | 12 setup_gitsvn |
13 | 13 |
14 ( | 14 ( |
15 set -e | 15 set -e |
16 cd git-svn | 16 cd git-svn |
17 git config rietveld.server localhost:8080 | 17 git config rietveld.server localhost:8080 |
18 | 18 |
19 # Create a branch and give it an issue. | 19 # Create a branch and give it an issue. |
20 git checkout -q -b new | 20 git checkout -q -b new |
21 mkdir dir | 21 mkdir dir |
22 cd dir | 22 cd dir |
23 echo "some work done on a branch" >> test | 23 echo "some work done on a branch" >> test |
24 git add test; git commit -q -m "branch work" | 24 git add test; git commit -q -m "branch work" |
25 export EDITOR=/bin/true | 25 export EDITOR=$(which true) |
26 test_expect_success "upload succeeds" \ | 26 test_expect_success "upload succeeds" \ |
27 "$GIT_CL upload -m test master... | grep -q 'Issue created'" | 27 "$GIT_CL upload -m test master... | grep -q 'Issue created'" |
28 test_expect_success "git-cl dcommits ok" \ | 28 test_expect_success "git-cl dcommits ok" \ |
29 "$GIT_CL dcommit -f" | 29 "$GIT_CL dcommit -f" |
30 ) | 30 ) |
31 | 31 |
32 SUCCESS=$? | 32 SUCCESS=$? |
33 | 33 |
34 cleanup | 34 cleanup |
35 | 35 |
36 if [ $SUCCESS == 0 ]; then | 36 if [ $SUCCESS == 0 ]; then |
37 echo PASS | 37 echo PASS |
38 fi | 38 fi |
OLD | NEW |