From 11bc04e8fc66a275b6b7477277e31e215f04cb31 Mon Sep 17 00:00:00 2001 From: minhqdao Date: Tue, 27 Feb 2024 18:54:26 +0300 Subject: [PATCH] More prints --- src/version_f.f90 | 9 +++++++-- test/test.f90 | 5 ----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/version_f.f90 b/src/version_f.f90 index 9b441c9..6d94bd1 100644 --- a/src/version_f.f90 +++ b/src/version_f.f90 @@ -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 @@ -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)) @@ -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 @@ -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 = '' diff --git a/test/test.f90 b/test/test.f90 index 99dd5ff..cc1f9e8 100644 --- a/test/test.f90 +++ b/test/test.f90 @@ -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.')