File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -372,6 +372,8 @@ impl<'input> Parser<'input> {
372372
373373 Some ( _) => return Err ( UnexpectedToken ( self . pop ( ) ?. to_string ( ) ) ) ,
374374 } ;
375+
376+ self . skip_whitespace ( ) ?;
375377 if self . peek ( ) == Some ( & Token :: And ) {
376378 self . pop ( ) ?;
377379 self . expect_whitespace ( ) ?;
Original file line number Diff line number Diff line change @@ -320,6 +320,37 @@ parse_range_test!(
320320 )
321321) ;
322322
323+ parse_range_test ! (
324+ pessimistic_and_gt,
325+ "~> 0.6 and >= 0.6.16" ,
326+ PubgrubRange :: higher_than( v( 0 , 6 , 0 ) )
327+ . intersection( & PubgrubRange :: strictly_lower_than( v( 1 , 0 , 0 ) ) )
328+ . intersection( & PubgrubRange :: higher_than( v( 0 , 6 , 16 ) ) )
329+ ) ;
330+
331+ parse_range_test ! (
332+ pessimistic_and_gt_pre,
333+ "~> 1.0-pre and >= 1.0.0-pre.5" ,
334+ PubgrubRange :: higher_than( v_(
335+ 1 ,
336+ 0 ,
337+ 0 ,
338+ vec![ Identifier :: AlphaNumeric ( "pre" . to_string( ) ) ] ,
339+ None
340+ ) )
341+ . intersection( & PubgrubRange :: strictly_lower_than( v( 2 , 0 , 0 ) ) )
342+ . intersection( & PubgrubRange :: higher_than( v_(
343+ 1 ,
344+ 0 ,
345+ 0 ,
346+ vec![
347+ Identifier :: AlphaNumeric ( "pre" . to_string( ) ) ,
348+ Identifier :: Numeric ( 5 )
349+ ] ,
350+ None
351+ ) ) )
352+ ) ;
353+
323354parse_range_fail_test ! ( range_quad, "1.1.1.1" ) ;
324355parse_range_fail_test ! ( range_just_major, "1" ) ;
325356parse_range_fail_test ! ( range_just_major_minor, "1.1" ) ;
You can’t perform that action at this time.
0 commit comments