]>
Commit | Line | Data |
---|---|---|
b510df8a EW |
1 | #!/bin/sh |
2 | # | |
3 | # Copyright (c) 2009 Eric Wong | |
4 | ||
5 | test_description='git svn refuses to dcommit non-UTF8 messages' | |
6 | ||
7 | . ./lib-git-svn.sh | |
8 | ||
9 | # ISO-2022-JP can pass for valid UTF-8, so skipping that in this test | |
10 | ||
18864314 | 11 | for H in ISO8859-1 eucJP |
b510df8a EW |
12 | do |
13 | test_expect_success "$H setup" ' | |
14 | mkdir $H && | |
15 | svn_cmd import -m "$H test" $H "$svnrepo"/$H && | |
16 | git svn clone "$svnrepo"/$H $H | |
17 | ' | |
18 | done | |
19 | ||
18864314 | 20 | for H in ISO8859-1 eucJP |
b510df8a EW |
21 | do |
22 | test_expect_success "$H commit on git side" ' | |
23 | ( | |
24 | cd $H && | |
25 | git config i18n.commitencoding $H && | |
26 | git checkout -b t refs/remotes/git-svn && | |
27 | echo $H >F && | |
28 | git add F && | |
29 | git commit -a -F "$TEST_DIRECTORY"/t3900/$H.txt && | |
30 | E=$(git cat-file commit HEAD | sed -ne "s/^encoding //p") && | |
31 | test "z$E" = "z$H" | |
32 | ) | |
33 | ' | |
34 | done | |
35 | ||
18864314 | 36 | for H in ISO8859-1 eucJP |
b510df8a EW |
37 | do |
38 | test_expect_success "$H dcommit to svn" ' | |
39 | ( | |
40 | cd $H && | |
41 | git config --unset i18n.commitencoding && | |
ce14e0b2 | 42 | test_must_fail git svn dcommit |
b510df8a EW |
43 | ) |
44 | ' | |
45 | done | |
46 | ||
47 | test_done |