Sha256: 4884f4d0b154be48a68fe931070043a2e06951e255fbbac822b5574d8488ecd2

Contents?: true

Size: 324 Bytes

Versions: 16

Compression:

Stored size: 324 Bytes

Contents

require 'facets/string/nchar'
require 'test/unit'

class TC_String_NChar < 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

16 entries across 16 versions & 1 rubygems

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