Skip to content

Commit 5253412

Browse files
committed
Fix new_test:
The wildcard command line usage on Windows to delete folders does not take effect in the actual test.
1 parent e4bdc04 commit 5253412

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

test/new_test/new_test.f90

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ program new_test
5757
case (OS_WINDOWS)
5858
path=windows_path(cmdpath)
5959
is_os_windows=.true.
60-
call execute_command_line('rmdir fpm_scratch_* /s /q',exitstat=estat,cmdstat=cstat,cmdmsg=message)
60+
do i=1,size(directories)
61+
call execute_command_line('rmdir /s /q fpm_scratch_'//trim(shortdirs(i)),exitstat=estat,&
62+
cmdstat=cstat,cmdmsg=message)
63+
end do
6164
case default
6265
write(*,*)'ERROR: unknown OS. Stopping test'
6366
stop 2
@@ -150,7 +153,12 @@ program new_test
150153
case (OS_UNKNOWN, OS_LINUX, OS_MACOS, OS_CYGWIN, OS_SOLARIS, OS_FREEBSD, OS_OPENBSD)
151154
rm_command = 'rm -rf ' // dirs_to_be_removed
152155
case (OS_WINDOWS)
153-
rm_command = 'rmdir ' // dirs_to_be_removed // ' /s /q'
156+
do i=1,size(directories)
157+
rm_command = 'rmdir /s /q fpm_scratch_'//trim(shortdirs(i))
158+
call execute_command_line('rmdir /s /q fpm_scratch_'//trim(shortdirs(i)),exitstat=estat,&
159+
cmdstat=cstat,cmdmsg=message)
160+
end do
161+
rm_command = 'rmdir /s /q name-with-hyphens'
154162
end select
155163
call execute_command_line(rm_command, exitstat=estat,cmdstat=cstat,cmdmsg=message)
156164

0 commit comments

Comments
 (0)