@@ -36,6 +36,8 @@ program new_test
36
36
character (len= :),allocatable :: expected(:)
37
37
logical ,allocatable :: tally(:)
38
38
logical :: IS_OS_WINDOWS
39
+ character (len=* ),parameter :: dirs_to_be_removed = ' fpm_scratch_* name-with-hyphens'
40
+ character (len= :),allocatable :: rm_command
39
41
write (* ,' (g0:,1x)' )' TEST new SUBCOMMAND (draft):'
40
42
41
43
cmdpath = get_command_path()
@@ -146,10 +148,11 @@ program new_test
146
148
! clean up scratch files; might want an option to leave them for inspection
147
149
select case (get_os_type())
148
150
case (OS_UNKNOWN, OS_LINUX, OS_MACOS, OS_CYGWIN, OS_SOLARIS, OS_FREEBSD, OS_OPENBSD)
149
- call execute_command_line( ' rm -rf fpm_scratch_* ' ,exitstat = estat,cmdstat = cstat,cmdmsg = message)
151
+ rm_command = ' rm -rf ' // dirs_to_be_removed
150
152
case (OS_WINDOWS)
151
- call execute_command_line( ' rmdir fpm_scratch_* / s /q' ,exitstat = estat,cmdstat = cstat,cmdmsg = message)
153
+ rm_command = ' rmdir ' // dirs_to_be_removed // ' / s /q'
152
154
end select
155
+ call execute_command_line(rm_command, exitstat= estat,cmdstat= cstat,cmdmsg= message)
153
156
154
157
write (* ,' ("new TEST TALLY=",*(g0))' )tally
155
158
if (all (tally))then
0 commit comments