aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinit current directory[i] <urbanjost@comcast.net>2020-12-04 09:54:30 -0500
committerinit current directory[i] <urbanjost@comcast.net>2020-12-04 09:54:30 -0500
commit76047363a625e9e4fbb90403050c29d070a5c126 (patch)
treeb619759ea76d674e02f44a60352b3630a0cf56ab
parent9fdc865d23bd49a687c8ae13d6142b9b351f554b (diff)
downloadfpm-76047363a625e9e4fbb90403050c29d070a5c126.tar.gz
fpm-76047363a625e9e4fbb90403050c29d070a5c126.zip
workaround for old compiler
-rw-r--r--fpm/test/help_test/help_test.f9021
1 files 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(*,*)'<ERROR>missing expected sections in ',names(i)
@@ -122,6 +126,17 @@ character(len=*),parameter :: names(*)=[character(len=10) :: 'fpm','new','build'
write(*,'(g0:,1x)')'<INFO>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