Support gloox version style
This commit is contained in:
		
							parent
							
								
									3bdeac3649
								
							
						
					
					
						commit
						17968f51c4
					
				@ -73,6 +73,10 @@ def extract_version basename
 | 
				
			|||||||
  /-((\d+\.)*\d+([abc]|rc\d))$/.match basename
 | 
					  /-((\d+\.)*\d+([abc]|rc\d))$/.match basename
 | 
				
			||||||
  return $1 if $1
 | 
					  return $1 if $1
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
 | 
					  # eg foobar-4.5.0-beta1
 | 
				
			||||||
 | 
					  /-((\d+\.)*\d+-beta\d+)$/.match basename
 | 
				
			||||||
 | 
					  return $1 if $1
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
  # eg. foobar4.5.1
 | 
					  # eg. foobar4.5.1
 | 
				
			||||||
  /((\d+\.)*\d+)$/.match basename
 | 
					  /((\d+\.)*\d+)$/.match basename
 | 
				
			||||||
  return $1 if $1
 | 
					  return $1 if $1
 | 
				
			||||||
 | 
				
			|||||||
@ -47,6 +47,11 @@ class BeerTasting <Test::Unit::TestCase
 | 
				
			|||||||
    assert_equal '9.04', r.version
 | 
					    assert_equal '9.04', r.version
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
 | 
					  def test_gloox_beta_style
 | 
				
			||||||
 | 
					    r=TestFormula.new "http://camaya.net/download/gloox-1.0-beta7.tar.bz2"
 | 
				
			||||||
 | 
					    assert_equal '1.0-beta7', r.version
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
  def test_astyle_verson_style
 | 
					  def test_astyle_verson_style
 | 
				
			||||||
    r=TestFormula.new "http://kent.dl.sourceforge.net/sourceforge/astyle/astyle_1.23_macosx.tar.gz"
 | 
					    r=TestFormula.new "http://kent.dl.sourceforge.net/sourceforge/astyle/astyle_1.23_macosx.tar.gz"
 | 
				
			||||||
    assert_equal '1.23', r.version
 | 
					    assert_equal '1.23', r.version
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user