From: Johannes Sixt <j6t@kdbg.org>
To: git@vger.kernel.org
Cc: Johannes Sixt <j6t@kdbg.org>
Subject: [PATCH 09/16] t9100, t9129: Use prerequisite tags for UTF-8 tests
Date: Sat, 21 Mar 2009 22:26:32 +0100 [thread overview]
Message-ID: <ed170175a2efbe8ff7043d58cf5f7fd275cf9986.1237667830.git.j6t@kdbg.org> (raw)
In-Reply-To: <cover.1237667830.git.j6t@kdbg.org>
In-Reply-To: <cover.1237667830.git.j6t@kdbg.org>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
t/t9100-git-svn-basic.sh | 37 +++++++++++++------------------
t/t9129-git-svn-i18n-commitencoding.sh | 22 ++++++++++--------
2 files changed, 28 insertions(+), 31 deletions(-)
diff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh
index bb921af..4eee2e9 100755
--- a/t/t9100-git-svn-basic.sh
+++ b/t/t9100-git-svn-basic.sh
@@ -6,19 +6,19 @@
test_description='git svn basic tests'
GIT_SVN_LC_ALL=${LC_ALL:-$LANG}
+. ./lib-git-svn.sh
+
+say 'define NO_SVN_TESTS to skip git svn tests'
+
case "$GIT_SVN_LC_ALL" in
*.UTF-8)
- have_utf8=t
+ test_set_prereq UTF8
;;
*)
- have_utf8=
+ say "UTF-8 locale not set, some tests skipped ($GIT_SVN_LC_ALL)"
;;
esac
-. ./lib-git-svn.sh
-
-say 'define NO_SVN_TESTS to skip git svn tests'
-
test_expect_success \
'initialize git svn' '
mkdir import &&
@@ -171,20 +171,15 @@ test_expect_success "$name" '
test ! -L "$SVN_TREE"/exec-2.sh &&
test_cmp help "$SVN_TREE"/exec-2.sh'
-if test "$have_utf8" = t
-then
- name="commit with UTF-8 message: locale: $GIT_SVN_LC_ALL"
- LC_ALL="$GIT_SVN_LC_ALL"
- export LC_ALL
- test_expect_success "$name" "
- echo '# hello' >> exec-2.sh &&
- git update-index exec-2.sh &&
- git commit -m 'éïâ' &&
- git svn set-tree HEAD"
- unset LC_ALL
-else
- say "UTF-8 locale not set, test skipped ($GIT_SVN_LC_ALL)"
-fi
+name="commit with UTF-8 message: locale: $GIT_SVN_LC_ALL"
+LC_ALL="$GIT_SVN_LC_ALL"
+export LC_ALL
+test_expect_success UTF8 "$name" "
+ echo '# hello' >> exec-2.sh &&
+ git update-index exec-2.sh &&
+ git commit -m 'éïâ' &&
+ git svn set-tree HEAD"
+unset LC_ALL
name='test fetch functionality (svn => git) with alternate GIT_SVN_ID'
GIT_SVN_ID=alt
@@ -197,7 +192,7 @@ test_expect_success "$name" \
name='check imported tree checksums expected tree checksums'
rm -f expected
-if test "$have_utf8" = t
+if test_have_prereq UTF8
then
echo tree bf522353586b1b883488f2bc73dab0d9f774b9a9 > expected
fi
diff --git a/t/t9129-git-svn-i18n-commitencoding.sh b/t/t9129-git-svn-i18n-commitencoding.sh
index 9c7b1ad..3200ab3 100755
--- a/t/t9129-git-svn-i18n-commitencoding.sh
+++ b/t/t9129-git-svn-i18n-commitencoding.sh
@@ -70,24 +70,26 @@ do
done
if locale -a |grep -q en_US.utf8; then
- test_expect_success 'ISO-8859-1 should match UTF-8 in svn' '
+ test_set_prereq UTF8
+else
+ say "UTF-8 locale not available, test skipped"
+fi
+
+test_expect_success UTF8 'ISO-8859-1 should match UTF-8 in svn' '
(
cd ISO-8859-1 &&
compare_svn_head_with "$TEST_DIRECTORY"/t3900/1-UTF-8.txt
)
- '
+'
- for H in EUCJP ISO-2022-JP
- do
- test_expect_success '$H should match UTF-8 in svn' '
+for H in EUCJP ISO-2022-JP
+do
+ test_expect_success UTF8 "$H should match UTF-8 in svn" '
(
cd $H &&
compare_svn_head_with "$TEST_DIRECTORY"/t3900/2-UTF-8.txt
)
- '
- done
-else
- say "UTF-8 locale not available, test skipped"
-fi
+ '
+done
test_done
--
1.6.2.1.224.g2225f
next prev parent reply other threads:[~2009-03-21 21:30 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-21 21:26 [PATCH 00/16] Tests on Windows - main part Johannes Sixt
2009-03-21 21:26 ` [PATCH 01/16] test-lib: Work around incompatible sort and find on Windows Johannes Sixt
2009-03-21 21:26 ` [PATCH 02/16] test-lib: Work around missing sum " Johannes Sixt
2009-03-21 21:26 ` [PATCH 03/16] Tests on Windows: $(pwd) must return Windows-style paths Johannes Sixt
2009-03-21 21:26 ` [PATCH 04/16] t0050: Check whether git init detected symbolic link support correctly Johannes Sixt
2009-03-21 21:26 ` [PATCH 05/16] test-lib: Infrastructure to test and check for prerequisites Johannes Sixt
2009-03-21 23:16 ` Junio C Hamano
2009-03-21 21:26 ` [PATCH 06/16] t3600: Use test prerequisite tags Johannes Sixt
2009-03-21 23:15 ` Junio C Hamano
2009-03-21 21:26 ` [PATCH 07/16] Skip tests that fail if the executable bit is not handled by the filesystem Johannes Sixt
2009-03-21 21:26 ` [PATCH 08/16] t5302: Use prerequisite tags to skip 64-bit offset tests Johannes Sixt
2009-03-21 21:26 ` Johannes Sixt [this message]
2009-03-21 21:26 ` [PATCH 10/16] Use prerequisite tags to skip tests that depend on symbolic links Johannes Sixt
2009-03-21 21:26 ` [PATCH 11/16] t0060: Fix tests on Windows Johannes Sixt
2009-03-21 21:26 ` [PATCH 12/16] Skip tests that require a filesystem that obeys POSIX permissions Johannes Sixt
2009-03-21 21:26 ` [PATCH 13/16] t3700: Skip a test with backslashes in pathspec Johannes Sixt
2009-03-21 23:14 ` Junio C Hamano
2009-03-22 16:55 ` Johannes Sixt
2009-03-22 21:59 ` Junio C Hamano
2009-03-21 21:26 ` [PATCH 14/16] Use prerequisites to skip tests that need unzip Johannes Sixt
2009-03-21 21:26 ` [PATCH 15/16] t7004: Use prerequisite tags to skip tests that need gpg Johannes Sixt
2009-03-21 21:26 ` [PATCH 16/16] t5503: GIT_DEBUG_SEND_PACK is not supported on MinGW Johannes Sixt
2009-03-21 21:41 ` [PATCH 00/16] Tests on Windows - main part Johannes Sixt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ed170175a2efbe8ff7043d58cf5f7fd275cf9986.1237667830.git.j6t@kdbg.org \
--to=j6t@kdbg.org \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).