@@ -304,7 +304,7 @@ subroutine test_split_lines_first_last(error)
304304 integer , allocatable :: first(:), last(:)
305305
306306 call split_lines_first_last(CR// LF// ' line1' // CR// ' line2' // LF// ' line3' // CR// LF// ' hello' , first, last)
307- if (.not. (all (first==[3 ,9 ,15 ,23 ]) .and. all (last==[7 ,13 ,21 , 27 ]))) then
307+ if (.not. (all (first==[3 ,9 ,15 ,21 ]) .and. all (last==[7 ,13 ,18 , 25 ]))) then
308308 call test_failed(error, " Test split_lines_first_last #1 failed" )
309309 return
310310 end if
@@ -351,6 +351,7 @@ subroutine test_dir_with_crlf(error)
351351
352352 type (string_t), allocatable :: lines(:)
353353 character (len= :), allocatable :: temp_file
354+ character (256 ) :: msg
354355 integer :: unit, i, ios
355356
356357 temp_file = get_temp_filename()
@@ -376,12 +377,14 @@ subroutine test_dir_with_crlf(error)
376377 lines = read_lines(temp_file)
377378
378379 if (.not. allocated (lines)) then
379- call test_failed(error, " Failed reading file with CRLF: no output" )
380+ write (msg, 1 ) ' no output'
381+ call test_failed(error, msg)
380382 return
381383 end if
382384
383385 if (size (lines)/= 5 ) then
384- call test_failed(error, " Failed reading file with CRLF: wrong number of lines" )
386+ write (msg, 1 ) ' wrong number of lines: expected ' ,5 ,' , actual ' ,size (lines)
387+ call test_failed(error, msg)
385388 return
386389 end if
387390
@@ -408,6 +411,8 @@ subroutine test_dir_with_crlf(error)
408411
409412 call delete_file(temp_file)
410413
414+ 1 format (" Failed reading file with CRLF: " ,a,:,i0,:,a,:,i0)
415+
411416 end subroutine test_dir_with_crlf
412417
413418
0 commit comments