]> git.ipfire.org Git - thirdparty/git.git/blob - t/t9115-git-svn-dcommit-funky-renames.sh
Don't use the 'export NAME=value' in the test scripts.
[thirdparty/git.git] / t / t9115-git-svn-dcommit-funky-renames.sh
1 #!/bin/sh
2 #
3 # Copyright (c) 2007 Eric Wong
4
5
6 test_description='git-svn dcommit can commit renames of files with ugly names'
7
8 . ./lib-git-svn.sh
9
10 test_expect_success 'load repository with strange names' "
11 svnadmin load -q $rawsvnrepo < ../t9115/funky-names.dump &&
12 start_httpd
13 "
14
15 test_expect_success 'init and fetch repository' "
16 git svn init $svnrepo &&
17 git svn fetch &&
18 git reset --hard git-svn
19 "
20
21 test_expect_success 'create file in existing ugly and empty dir' '
22 mkdir "#{bad_directory_name}" &&
23 echo hi > "#{bad_directory_name}/ foo" &&
24 git update-index --add "#{bad_directory_name}/ foo" &&
25 git commit -m "new file in ugly parent" &&
26 git svn dcommit
27 '
28
29 test_expect_success 'rename ugly file' '
30 git mv "#{bad_directory_name}/ foo" "file name with feces" &&
31 git commit -m "rename ugly file" &&
32 git svn dcommit
33 '
34
35 test_expect_success 'rename pretty file' '
36 echo :x > pretty &&
37 git update-index --add pretty &&
38 git commit -m "pretty :x" &&
39 git svn dcommit &&
40 mkdir regular_dir_name &&
41 git mv pretty regular_dir_name/pretty &&
42 git commit -m "moved pretty file" &&
43 git svn dcommit
44 '
45
46 test_expect_success 'rename pretty file into ugly one' '
47 git mv regular_dir_name/pretty "#{bad_directory_name}/ booboo" &&
48 git commit -m booboo &&
49 git svn dcommit
50 '
51
52 stop_httpd
53
54 test_done