forked from github/server
testing that words do not get split, lines get split at spaces.
This commit is contained in:
parent
a85fa491e7
commit
873b1a81af
|
@ -153,6 +153,23 @@ static void test_sparagraph(CuTest *tc) {
|
||||||
freestrlist(sp);
|
freestrlist(sp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void test_sparagraph_long(CuTest *tc) {
|
||||||
|
strlist *sp = 0;
|
||||||
|
|
||||||
|
split_paragraph(&sp, "HelloWorld HelloWorld", 0, 16, 0);
|
||||||
|
CuAssertPtrNotNull(tc, sp);
|
||||||
|
CuAssertStrEquals(tc, "HelloWorld", sp->s);
|
||||||
|
CuAssertStrEquals(tc, "HelloWorld", sp->next->s);
|
||||||
|
CuAssertPtrEquals(tc, NULL, sp->next->next);
|
||||||
|
freestrlist(sp);
|
||||||
|
|
||||||
|
split_paragraph(&sp, "HelloWorldHelloWorld", 0, 16, 0);
|
||||||
|
CuAssertPtrNotNull(tc, sp);
|
||||||
|
CuAssertStrEquals(tc, "HelloWorldHelloWorld", sp->s);
|
||||||
|
CuAssertPtrEquals(tc, NULL, sp->next);
|
||||||
|
freestrlist(sp);
|
||||||
|
}
|
||||||
|
|
||||||
static void test_bufunit_fstealth(CuTest *tc) {
|
static void test_bufunit_fstealth(CuTest *tc) {
|
||||||
faction *f1, *f2;
|
faction *f1, *f2;
|
||||||
region *r;
|
region *r;
|
||||||
|
@ -767,6 +784,7 @@ CuSuite *get_reports_suite(void)
|
||||||
SUITE_ADD_TEST(suite, test_seen_faction);
|
SUITE_ADD_TEST(suite, test_seen_faction);
|
||||||
SUITE_ADD_TEST(suite, test_regionid);
|
SUITE_ADD_TEST(suite, test_regionid);
|
||||||
SUITE_ADD_TEST(suite, test_sparagraph);
|
SUITE_ADD_TEST(suite, test_sparagraph);
|
||||||
|
SUITE_ADD_TEST(suite, test_sparagraph_long);
|
||||||
SUITE_ADD_TEST(suite, test_bufunit);
|
SUITE_ADD_TEST(suite, test_bufunit);
|
||||||
SUITE_ADD_TEST(suite, test_bufunit_fstealth);
|
SUITE_ADD_TEST(suite, test_bufunit_fstealth);
|
||||||
SUITE_ADD_TEST(suite, test_arg_resources);
|
SUITE_ADD_TEST(suite, test_arg_resources);
|
||||||
|
|
Loading…
Reference in New Issue