git-svn: hoist out utf8 prep from t9129 to lib-git-svn
authorEric Wong <normalperson@yhbt.net>
Mon, 22 Feb 2016 02:17:51 +0000 (02:17 +0000)
committerEric Wong <normalperson@yhbt.net>
Mon, 22 Feb 2016 02:21:19 +0000 (02:21 +0000)
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>
t/lib-git-svn.sh
t/t9129-git-svn-i18n-commitencoding.sh
index b0ec12ff6cbcdd7352b764db32bc34340b37fc8a..6a50b8793e4ff840e67d20c169159f474cb9d297 100644 (file)
@@ -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
+}
index 39b6bcb398fff970184e242bdd51500b84f7d382..8dbd6476fa181dc7a2b3f0b6a9dfff57155c9eea 100755 (executable)
@@ -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.