git-svn: hoist out utf8 prep from t9129 to lib-git-svn
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>
Eric Wong committed
Feb 22, 2016 at 02:17 UTC
3df0d26ca6664a20364a323ffe9915459901cf05
2 files changed
+13
-11
t/lib-git-svn.sh
+12
@@ -186,3 +186,15 @@ start_svnserve () {
186
--listen-host 127.0.0.1 &
187
}
188
189
+prepare_a_utf8_locale () {
190
+ a_utf8_locale=$(locale -a | sed -n '/\.[uU][tT][fF]-*8$/{
191
+ p
192
+ q
193
+}')
194
+ if test -n "$a_utf8_locale"
195
+ then
196
+ test_set_prereq UTF8
197
+ else
198
+ say "# UTF-8 locale not available, some tests are skipped"
199
+ fi
200
+}
t/t9129-git-svn-i18n-commitencoding.sh
+1
-11
@@ -14,17 +14,7 @@ compare_git_head_with () {
14
test_cmp current "$1"
15
}
16
17
-a_utf8_locale=$(locale -a | sed -n '/\.[uU][tT][fF]-*8$/{
18
- p
19
- q
20
-}')
21
-
22
-if test -n "$a_utf8_locale"
23
-then
24
- test_set_prereq UTF8
25
-else
26
- say "# UTF-8 locale not available, some tests are skipped"
27
-fi
17
+prepare_a_utf8_locale
18
19
compare_svn_head_with () {
20
# extract just the log message and strip out committer info.