@@ -36,6 +36,8 @@ program new_test
3636character (len= :),allocatable :: expected(:)
3737logical ,allocatable :: tally(:)
3838logical :: IS_OS_WINDOWS
39+ character (len=* ),parameter :: dirs_to_be_removed = ' fpm_scratch_* name-with-hyphens'
40+ character (len= :),allocatable :: rm_command
3941 write (* ,' (g0:,1x)' )' TEST new SUBCOMMAND (draft):'
4042
4143 cmdpath = get_command_path()
@@ -146,10 +148,11 @@ program new_test
146148 ! clean up scratch files; might want an option to leave them for inspection
147149 select case (get_os_type())
148150 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
150152 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'
152154 end select
155+ call execute_command_line(rm_command, exitstat= estat,cmdstat= cstat,cmdmsg= message)
153156
154157 write (* ,' ("new TEST TALLY=",*(g0))' )tally
155158 if (all (tally))then
0 commit comments