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