Merge branch 'gmtool' into develop

Conflicts:
	src/util/unicode.test.c
This commit is contained in:
Enno Rehling 2017-01-31 22:19:00 +01:00
commit 534e5874e9
2 changed files with 9 additions and 1 deletions

View File

@ -33,7 +33,7 @@ fi
echo "build eressea" echo "build eressea"
cd $ROOT/$BUILD cd $ROOT/$BUILD
BRANCH=$(git status -s -b | head -1 | cut -d\ -f 2 | sed 's/\..*//') BRANCH=$(git status -s -b | head -1 | cut -d\ -f 2 | sed 's/\..*//')
if [ "$BRANCH" == "master" ] ; then if [ "$BRANCH"=="master" ] ; then
VERSION=$(git describe --match 'v*.*.*' --tags | sed 's/^v//') VERSION=$(git describe --match 'v*.*.*' --tags | sed 's/^v//')
cmake -DERESSEA_VERSION="$VERSION" .. cmake -DERESSEA_VERSION="$VERSION" ..
else else

View File

@ -116,6 +116,13 @@ static void test_unicode_bug2262(CuTest *tc) {
CuAssertIntEquals(tc, EILSEQ, unicode_utf8_trim(name)); CuAssertIntEquals(tc, EILSEQ, unicode_utf8_trim(name));
} }
static void test_unicode_compare(CuTest *tc)
{
CuAssertIntEquals(tc, 0, unicode_utf8_strcasecmp("ABCDEFG", "abcdefg"));
CuAssertIntEquals(tc, 0, unicode_utf8_strcasecmp("abcdefg123", "ABCDEFG123"));
CuAssertIntEquals(tc, 1, unicode_utf8_strcasecmp("bacdefg123", "ABCDEFG123"));
}
CuSuite *get_unicode_suite(void) CuSuite *get_unicode_suite(void)
{ {
CuSuite *suite = CuSuiteNew(); CuSuite *suite = CuSuiteNew();
@ -124,5 +131,6 @@ CuSuite *get_unicode_suite(void)
SUITE_ADD_TEST(suite, test_unicode_trim); SUITE_ADD_TEST(suite, test_unicode_trim);
SUITE_ADD_TEST(suite, test_unicode_utf8_to_other); SUITE_ADD_TEST(suite, test_unicode_utf8_to_other);
SUITE_ADD_TEST(suite, test_unicode_utf8_to_ucs); SUITE_ADD_TEST(suite, test_unicode_utf8_to_ucs);
SUITE_ADD_TEST(suite, test_unicode_compare);
return suite; return suite;
} }