tests/document-output-stream.c: change substring length from 2 to 3 in EOL tests.

CRs always appear at the same modulus 2 offset in test strings, thus bug
https://github.com/mate-desktop/pluma/issues/100 is never detected.
Setting substring lengths to 3 causes the test to detect bug #100, thus failing,
as it should yet do.
This commit is contained in:
Patrick Monnerat 2015-10-08 16:30:59 +02:00
parent b580b35445
commit 78101257f4
1 changed files with 6 additions and 6 deletions

View File

@ -91,22 +91,22 @@ test_empty ()
static void
test_consecutive ()
{
test_consecutive_write ("hello\nhow\nare\nyou", "hello\nhow\nare\nyou", 2,
test_consecutive_write ("hello\nhow\nare\nyou", "hello\nhow\nare\nyou", 3,
PLUMA_DOCUMENT_NEWLINE_TYPE_LF);
test_consecutive_write ("hello\rhow\rare\ryou", "hello\rhow\rare\ryou", 2,
test_consecutive_write ("hello\rhow\rare\ryou", "hello\rhow\rare\ryou", 3,
PLUMA_DOCUMENT_NEWLINE_TYPE_CR);
test_consecutive_write ("hello\r\nhow\r\nare\r\nyou", "hello\r\nhow\r\nare\r\nyou", 2,
test_consecutive_write ("hello\r\nhow\r\nare\r\nyou", "hello\r\nhow\r\nare\r\nyou", 3,
PLUMA_DOCUMENT_NEWLINE_TYPE_CR_LF);
}
static void
test_consecutive_tnewline ()
{
test_consecutive_write ("hello\nhow\nare\nyou\n", "hello\nhow\nare\nyou", 2,
test_consecutive_write ("hello\nhow\nare\nyou\n", "hello\nhow\nare\nyou", 3,
PLUMA_DOCUMENT_NEWLINE_TYPE_LF);
test_consecutive_write ("hello\rhow\rare\ryou\r", "hello\rhow\rare\ryou", 2,
test_consecutive_write ("hello\rhow\rare\ryou\r", "hello\rhow\rare\ryou", 3,
PLUMA_DOCUMENT_NEWLINE_TYPE_CR);
test_consecutive_write ("hello\r\nhow\r\nare\r\nyou\r\n", "hello\r\nhow\r\nare\r\nyou", 2,
test_consecutive_write ("hello\r\nhow\r\nare\r\nyou\r\n", "hello\r\nhow\r\nare\r\nyou", 3,
PLUMA_DOCUMENT_NEWLINE_TYPE_CR_LF);
}