Skip to content

Commit

Permalink
git-svn: hoist out utf8 prep from t9129 to lib-git-svn
Browse files Browse the repository at this point in the history
We will be reusing this in t9115.

Suggested-by: Kazutoshi Satoda <k_satoda@f2.dion.ne.jp>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
  • Loading branch information
Eric Wong committed Feb 22, 2016
1 parent 0233b80 commit 3df0d26
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
12 changes: 12 additions & 0 deletions t/lib-git-svn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -186,3 +186,15 @@ start_svnserve () {
--listen-host 127.0.0.1 &
}

prepare_a_utf8_locale () {
a_utf8_locale=$(locale -a | sed -n '/\.[uU][tT][fF]-*8$/{
p
q
}')
if test -n "$a_utf8_locale"
then
test_set_prereq UTF8
else
say "# UTF-8 locale not available, some tests are skipped"
fi
}
12 changes: 1 addition & 11 deletions t/t9129-git-svn-i18n-commitencoding.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,7 @@ compare_git_head_with () {
test_cmp current "$1"
}

a_utf8_locale=$(locale -a | sed -n '/\.[uU][tT][fF]-*8$/{
p
q
}')

if test -n "$a_utf8_locale"
then
test_set_prereq UTF8
else
say "# UTF-8 locale not available, some tests are skipped"
fi
prepare_a_utf8_locale

compare_svn_head_with () {
# extract just the log message and strip out committer info.
Expand Down

0 comments on commit 3df0d26

Please sign in to comment.