From 76047363a625e9e4fbb90403050c29d070a5c126 Mon Sep 17 00:00:00 2001 From: "init current directory[i]" Date: Fri, 4 Dec 2020 09:54:30 -0500 Subject: workaround for old compiler --- fpm/test/help_test/help_test.f90 | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/fpm/test/help_test/help_test.f90 b/fpm/test/help_test/help_test.f90 index c489018..c7c62ee 100644 --- a/fpm/test/help_test/help_test.f90 +++ b/fpm/test/help_test/help_test.f90 @@ -54,9 +54,13 @@ character(len=*),parameter :: names(*)=[character(len=10) :: 'fpm','new','build' endif !!write(*,*)findloc(page1,'NAME').eq.1 be=count(.not.tally) - tally=[tally,count(page1.eq.'NAME').eq.1] - tally=[tally,count(page1.eq.'SYNOPSIS').eq.1] - tally=[tally,count(page1.eq.'DESCRIPTION').eq.1] + !!mingw bug this returns 0 + !!tally=[tally,count(page1.eq.'NAME').eq.1] + !!tally=[tally,count(page1.eq.'SYNOPSIS').eq.1] + !!tally=[tally,count(page1.eq.'DESCRIPTION').eq.1] + tally=[tally,bugcount(page1,'NAME').eq.1] + tally=[tally,bugcount(page1,'SYNOPSIS').eq.1] + tally=[tally,bugcount(page1,'DESCRIPTION').eq.1] af=count(.not.tally) if(be.ne.af)then write(*,*)'missing expected sections in ',names(i) @@ -122,6 +126,17 @@ character(len=*),parameter :: names(*)=[character(len=10) :: 'fpm','new','build' write(*,'(g0:,1x)')'TEST help SUBCOMMAND COMPLETE' contains +function bugcount(page,string) +character(len=*),intent(in) :: page(:) +character(len=*),intent(in) :: string +integer :: bugcount +integer :: i +bugcount=0 + do i = 1,size(page) + if(page(i).eq.string)bugcount=bugcount+1 + enddo +end function bugcount + subroutine wipe(filename) character(len=*),intent(in) :: filename integer :: ios -- cgit v1.2.3