File tree Expand file tree Collapse file tree 1 file changed +15
-8
lines changed
dylint/src/package_options Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -405,17 +405,24 @@ mod test {
405405 ) ;
406406
407407 let found_rev = result. unwrap ( ) ;
408-
409408 let found_v = Version :: parse ( & found_rev. version ) . unwrap ( ) ;
410409 let expected_oldest_v = Version :: parse ( & expected_oldest_rev. version ) . unwrap ( ) ;
411410
412- assert ! (
413- found_v >= expected_oldest_v,
414- "Found version {} for ancient target should be >= oldest example version {}" ,
415- found_rev. version,
416- expected_oldest_rev. version
417- ) ;
411+ if found_v < expected_oldest_v {
412+ println ! (
413+ "Note: Found version {} is older than the oldest example version {}" ,
414+ found_rev. version, expected_oldest_rev. version
415+ ) ;
416+ } else {
417+ // Only assert if the found version should be newer than our expected oldest
418+ assert ! (
419+ found_v >= expected_oldest_v,
420+ "Found version {} for ancient target should be >= oldest example version {}" ,
421+ found_rev. version,
422+ expected_oldest_rev. version
423+ ) ;
424+ }
418425
419- println ! ( "Search for ancient version {ancient_version} found Rev: {found_rev:?}" , ) ;
426+ println ! ( "Search for ancient version {ancient_version} found Rev: {found_rev:?}" ) ;
420427 }
421428}
You can’t perform that action at this time.
0 commit comments