@@ -64,6 +64,7 @@ subroutine test_7(error_cnt)
64
64
integer ,intent (out ) :: error_cnt
65
65
66
66
type (json_value),pointer :: root,a,b,c,d,e,e1,e2,escaped_string
67
+ logical :: found
67
68
68
69
error_cnt = 0
69
70
call json_initialize()
@@ -249,6 +250,9 @@ subroutine test_7(error_cnt)
249
250
error_cnt = error_cnt + 1
250
251
end if
251
252
253
+ call json_add(root,' wacky string' ,[' trim ' ,' and ' ,' adjust' ,' left' ],&
254
+ trim_str= .true. ,adjustl_str= .true. )
255
+
252
256
nullify(a) ! don't need these anymore
253
257
nullify(b)
254
258
nullify(c)
@@ -263,6 +267,14 @@ subroutine test_7(error_cnt)
263
267
call json_print_error_message(error_unit)
264
268
error_cnt = error_cnt + 1
265
269
end if
270
+ ! look for the 'escaped string' entry
271
+ call json_get(root,' escaped string' ,escaped_string,found)
272
+ if (.not. found) then
273
+ call json_print_error_message(error_unit)
274
+ error_cnt = error_cnt + 1
275
+ end if
276
+ ! remove the escaped string entry
277
+ if (found) call json_remove(escaped_string,destroy= .true. )
266
278
call json_print(root,error_unit) ! print to stderr
267
279
if (json_failed()) then
268
280
call json_print_error_message(error_unit)
0 commit comments