From 78101257f40bbf8a0d7b606bee36e527f9b0ea11 Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Thu, 8 Oct 2015 16:30:59 +0200 Subject: 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. --- tests/document-output-stream.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/document-output-stream.c b/tests/document-output-stream.c index a7e93a32..75587c50 100644 --- a/tests/document-output-stream.c +++ b/tests/document-output-stream.c @@ -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); } -- cgit v1.2.1