@@ -304,7 +304,7 @@ subroutine test_split_lines_first_last(error)
304
304
integer , allocatable :: first(:), last(:)
305
305
306
306
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
308
308
call test_failed(error, " Test split_lines_first_last #1 failed" )
309
309
return
310
310
end if
@@ -351,6 +351,7 @@ subroutine test_dir_with_crlf(error)
351
351
352
352
type (string_t), allocatable :: lines(:)
353
353
character (len= :), allocatable :: temp_file
354
+ character (256 ) :: msg
354
355
integer :: unit, i, ios
355
356
356
357
temp_file = get_temp_filename()
@@ -376,12 +377,14 @@ subroutine test_dir_with_crlf(error)
376
377
lines = read_lines(temp_file)
377
378
378
379
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)
380
382
return
381
383
end if
382
384
383
385
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)
385
388
return
386
389
end if
387
390
@@ -408,6 +411,8 @@ subroutine test_dir_with_crlf(error)
408
411
409
412
call delete_file(temp_file)
410
413
414
+ 1 format (" Failed reading file with CRLF: " ,a,:,i0,:,a,:,i0)
415
+
411
416
end subroutine test_dir_with_crlf
412
417
413
418
0 commit comments