Sha256: 3ec3d7485d250c9dcad9ab8ca5508a7476f2c476731056049a5cc71dbccc0f0e

Contents?: true

Size: 359 Bytes

Versions: 3

Compression:

Stored size: 359 Bytes

Contents

# Test for facets/string/index

require 'facets/string/nchar.rb'

require 'test/unit'

class TestStringNChar < Test::Unit::TestCase

  def test_nchar
    assert_equal( "abc", "abcxyz".nchar(3) )
    assert_equal( "xyz", "abcxyz".nchar(-3) )
    assert_equal( "HIxyz", "abcxyz".nchar(3, 'HI') )
    assert_equal( "abcHI", "abcxyz".nchar(-3, 'HI') )
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
facets-2.2.0 test/unit/string/test_nchar.rb
facets-2.2.1 test/unit/string/test_nchar.rb
facets-2.3.0 test/core/string/test_nchar.rb