Skip to content

Commit d9c0a5b

Browse files
committed
I don't understand why this is now failing on linux. added some debugging prints to see what is going on.
1 parent 37e02ac commit d9c0a5b

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

src/tests/jf_test_06.F90

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ subroutine test_6(error_cnt)
2929
integer,intent(out) :: error_cnt
3030

3131
type(json_file) :: json
32-
integer :: i
32+
integer :: i, j
3333
character(kind=CK,len=:),allocatable :: error_msg
34+
character(kind=CK,len=:),allocatable :: expected_error_msg
3435
logical(LK) :: status_ok
3536

3637
character(len=*),dimension(3),parameter :: files = ['invalid.json ',&
@@ -61,13 +62,20 @@ subroutine test_6(error_cnt)
6162

6263
if (i==1) then
6364
call json%check_for_errors(status_ok, error_msg=error_msg)
64-
if (error_msg /= &
65-
CK_'Error in parse_array: Unexpected character encountered when parsing array.'//newline//&
66-
CK_'line: 13, character: 1'//newline//&
67-
CK_'}'//newline//&
68-
'^') then
65+
expected_error_msg = CK_'Error in parse_array: Unexpected charact9er encountered when parsing array.'//newline//&
66+
CK_'line: 13, character: 1'//newline//&
67+
CK_'}'//newline//'^'
68+
if (error_msg /= expected_error_msg) then
6969
! verify that the expected error string is present
7070
write(error_unit,'(A)') 'Error: unexpected error message string: "'//error_msg//'"'
71+
write(error_unit,'(A)') ''
72+
write(error_unit,*) 'len(error_msg) = ', len(error_msg)
73+
write(error_unit,*) 'len(expected_error_msg) = ', len(expected_error_msg)
74+
do j = 1, min(len(error_msg), len(expected_error_msg))
75+
if (error_msg(j:j) /= expected_error_msg(j:j)) then
76+
write(error_unit,'(I3,1X,A,A,A,A,A)') j, '"', error_msg(j:j), '" /= "', expected_error_msg(j:j), '"'
77+
end if
78+
end do
7179
error_cnt = error_cnt + 1
7280
end if
7381
end if

0 commit comments

Comments
 (0)