@@ -166,18 +166,15 @@ subroutine test_exists_symlink(error)
166
166
call execute_command_line(cmd, exitstat= ios, cmdstat= iocmd, cmdmsg= msg)
167
167
else
168
168
cmd = ' ln -s ' // target_name// ' ' // link_name
169
- print * , cmd
170
169
call execute_command_line(cmd, exitstat= ios, cmdstat= iocmd, cmdmsg= msg)
171
- cmd = ' mklink ' // link_name// ' ' // target_name
172
- print * , cmd
173
170
end if
174
171
175
172
call check(error, ios == 0 .and. iocmd == 0 , " Cannot create symlink!: " // trim (msg))
176
173
177
174
if (allocated (error)) then
178
175
! Clean up: remove the target
179
176
close (iunit,status= ' delete' ,iostat= ios,iomsg= msg)
180
- call check(error, ios == 0 , err% message // " and cannot delete target: " // trim (msg))
177
+ call check(error, ios == 0 , err% message // " and cannot delete target: " // trim (msg))
181
178
return
182
179
end if
183
180
@@ -187,12 +184,12 @@ subroutine test_exists_symlink(error)
187
184
if (allocated (error)) then
188
185
! Clean up: remove the link
189
186
call execute_command_line(" rm " // link_name, exitstat= ios, cmdstat= iocmd, cmdmsg= msg)
190
- call check(error, ios == 0 .and. iocmd == 0 , err% message // " and &
187
+ call check(error, ios == 0 .and. iocmd == 0 , err% message // " and &
191
188
& cannot delete link: " // trim (msg))
192
189
193
190
! Clean up: remove the target
194
191
close (iunit,status= ' delete' ,iostat= ios,iomsg= msg)
195
- call check(error, ios == 0 , err% message // " and cannot delete target: " // trim (msg))
192
+ call check(error, ios == 0 , err% message // " and cannot delete target: " // trim (msg))
196
193
return
197
194
end if
198
195
@@ -220,6 +217,10 @@ subroutine test_exists_symlink(error)
220
217
close (iunit,status= ' delete' ,iostat= ios,iomsg= msg)
221
218
call check(error, ios == 0 , err% message // " and cannot delete target: " // trim (msg))
222
219
end if
220
+
221
+ ! Clean up: remove the target
222
+ close (iunit,status= ' delete' ,iostat= ios,iomsg= msg)
223
+ call check(error, ios == 0 , " Cannot delete target: " // trim (msg))
223
224
end subroutine test_exists_symlink
224
225
225
226
! Test `is_directory` for a directory
0 commit comments