Skip to content

Commit 7604736

Browse files
committed
workaround for old compiler
1 parent 9fdc865 commit 7604736

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

fpm/test/help_test/help_test.f90

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,13 @@ program help_test
5454
endif
5555
!!write(*,*)findloc(page1,'NAME').eq.1
5656
be=count(.not.tally)
57-
tally=[tally,count(page1.eq.'NAME').eq.1]
58-
tally=[tally,count(page1.eq.'SYNOPSIS').eq.1]
59-
tally=[tally,count(page1.eq.'DESCRIPTION').eq.1]
57+
!!mingw bug this returns 0
58+
!!tally=[tally,count(page1.eq.'NAME').eq.1]
59+
!!tally=[tally,count(page1.eq.'SYNOPSIS').eq.1]
60+
!!tally=[tally,count(page1.eq.'DESCRIPTION').eq.1]
61+
tally=[tally,bugcount(page1,'NAME').eq.1]
62+
tally=[tally,bugcount(page1,'SYNOPSIS').eq.1]
63+
tally=[tally,bugcount(page1,'DESCRIPTION').eq.1]
6064
af=count(.not.tally)
6165
if(be.ne.af)then
6266
write(*,*)'<ERROR>missing expected sections in ',names(i)
@@ -122,6 +126,17 @@ program help_test
122126
write(*,'(g0:,1x)')'<INFO>TEST help SUBCOMMAND COMPLETE'
123127
contains
124128

129+
function bugcount(page,string)
130+
character(len=*),intent(in) :: page(:)
131+
character(len=*),intent(in) :: string
132+
integer :: bugcount
133+
integer :: i
134+
bugcount=0
135+
do i = 1,size(page)
136+
if(page(i).eq.string)bugcount=bugcount+1
137+
enddo
138+
end function bugcount
139+
125140
subroutine wipe(filename)
126141
character(len=*),intent(in) :: filename
127142
integer :: ios

0 commit comments

Comments
 (0)