Sha256: d5e95598d03fba7d4c183d385851ccef2e09de4ba6c7c199dc6f26af85ea1e32

Contents?: true

Size: 465 Bytes

Versions: 19

Compression:

Stored size: 465 Bytes

Contents

# Test for facets/string/natcmp

require 'facets/string/natcmp.rb'

require 'test/unit'

class TestStringCompare < Test::Unit::TestCase

  def test_natcmp
    assert( -1, "my_prog_v1.1.0".natcmp("my_prog_v1.2.0") )
    assert( -1, "my_prog_v1.2.0".natcmp("my_prog_v1.10.0") )
    assert( 1, "my_prog_v1.2.0".natcmp("my_prog_v1.1.0") )
    assert( 1, "my_prog_v1.10.0".natcmp("my_prog_v1.2.0") )
    assert( 0, "my_prog_v1.0.0".natcmp("my_prog_v1.0.0") )
  end

end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
facets-2.8.4 test/core/string/test_natcmp.rb
facets-2.8.3 test/core/string/test_natcmp.rb
facets-2.8.2 test/core/string/test_natcmp.rb
facets-2.8.1 test/core/string/test_natcmp.rb
facets-2.8.0 test/core/string/test_natcmp.rb
facets-2.7.0 test/core/string/test_natcmp.rb
facets-2.6.0 test/core/string/test_natcmp.rb
facets-2.4.0 test/string/test_natcmp.rb
facets-2.2.1 test/unit/string/test_natcmp.rb
facets-2.3.0 test/core/string/test_natcmp.rb
facets-2.2.0 test/unit/string/test_natcmp.rb
facets-2.4.1 test/string/test_natcmp.rb
facets-2.4.4 test/core/string/test_natcmp.rb
facets-2.4.3 test/core/string/test_natcmp.rb
facets-2.4.2 test/core/string/test_natcmp.rb
facets-2.5.0 test/core/string/test_natcmp.rb
facets-2.4.5 test/core/string/test_natcmp.rb
facets-2.5.1 test/core/string/test_natcmp.rb
facets-2.5.2 test/core/string/test_natcmp.rb