Skip to content

Commit

Permalink
More prints
Browse files Browse the repository at this point in the history
  • Loading branch information
minhqdao committed Feb 27, 2024
1 parent eb54a69 commit 11bc04e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
9 changes: 7 additions & 2 deletions src/version_f.f90
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ subroutine parse_version_range(this, string, error)
end

!> Parse a set of comparators that are separated by ` ` from a string. An
!> example of a set of comparators is `>=1.2.3 <2.0.0`.
!> example of a set of two comparators is `>=1.2.3 <2.0.0`.
subroutine parse_comp_set(this, string, error)

!> Set of comparators to be determined. They are separated by ` ` if there
Expand All @@ -912,7 +912,7 @@ subroutine parse_comp_set(this, string, error)
end if

allocate (this%comps(0))

print *, 'way before ', str
do
str = trim(adjustl(str))

Expand Down Expand Up @@ -943,6 +943,7 @@ subroutine parse_comp_set(this, string, error)
else
call comp%parse_comp_and_crop_str('', str, error)
end if

if (allocated(error)) return
this%comps = [this%comps, comp]
if (str == '') return
Expand All @@ -969,9 +970,13 @@ subroutine parse_comp_and_crop_str(comp, op, str, error)

comp%op = op

print *, op
print *, str, 'before'
str = trim(adjustl(str(len(op) + 1:)))

print *, str, 'after'
i = operator_index(str)
print *, 'index ', i
if (i == 0) then
call comp%version%parse(str, error)
str = ''
Expand Down
5 changes: 0 additions & 5 deletions test/test.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1452,11 +1452,6 @@ program test
if (allocated(e)) call fail('parse-comp-set-7 should not fail.')

call comp_set%parse(' > 1.0.1 < 2.1.0 ', e)
print *, size(comp_set%comps)
print *, comp_set%comps(1)%op
print *, comp_set%comps(1)%version%to_string()
print *, comp_set%comps(2)%op
print *, comp_set%comps(2)%version%to_string()
if (size(comp_set%comps) /= 2) call fail("parse-comp-set-8: Wrong number of comparators.")
if (comp_set%comps(1)%op /= '>') call fail("parse-comp-set-8: Wrong operator parsed.")
if (comp_set%comps(1)%version /= version_t(1, 0, 1)) call fail('parse-comp-set-8: Version does not match.')
Expand Down

0 comments on commit 11bc04e

Please sign in to comment.