Skip to content

Commit

Permalink
more testing
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett committed Jun 3, 2024
1 parent d9f9086 commit efa86e0
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions tests/test_mkfldsep.F90
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,31 @@ program test_mkflsep

print *, "Testing mkfldsep(), expect and ignore error messages..."

! This will succeed.
print *, 'testing with iopt 1...'
print *, 'testing with iopt 1, lenin > 18...'
iopt = 1
lenin = 18
itot = 5000
lenbull = itot + lenhead
call mkfldsep(csep, iopt, lenin, lenbull, lenout)
do i = 1, lenin
print *, i, ichar(csep(i))
end do

! Check every byte of result.
do i = 1, 4
if (csep(i) .ne. '#') stop 100
end do
if (csep(5) .ne. '0' .or. csep(6) .ne. '1' .or. csep(7) .ne. '8') stop 101
! This is the length of message plus header as an i6.6.
if (csep(8) .ne. '0' .or. csep(9) .ne. '0' .or. csep(10) .ne. '5') stop 102
if (csep(11) .ne. '0' .or. csep(12) .ne. '2' .or. csep(13) .ne. '1') stop 103
do i = 14, 17
if (csep(i) .ne. '#') stop 105
end do
if (csep(18) .ne. char(10)) stop 107
print *, 'OK!'

print *, 'testing with iopt 1, lenin = 18...'
iopt = 1
lenin = 18
itot = 5000
Expand Down

0 comments on commit efa86e0

Please sign in to comment.