PageRenderTime 49ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/vendor/gems/facets-2.4.5/test/core/string/test_nchar.rb

https://bitbucket.org/mediashelf/fedora-migrator
Ruby | 14 lines | 10 code | 4 blank | 0 comment | 0 complexity | 26cbc74077d0dbdc7285419977ed470c MD5 | raw file
Possible License(s): GPL-3.0, GPL-2.0, IPL-1.0, AGPL-1.0, LGPL-3.0
  1. require 'facets/string/nchar'
  2. require 'test/unit'
  3. class TC_String_NChar < Test::Unit::TestCase
  4. def test_nchar
  5. assert_equal( "abc", "abcxyz".nchar(3) )
  6. assert_equal( "xyz", "abcxyz".nchar(-3) )
  7. assert_equal( "HIxyz", "abcxyz".nchar(3, 'HI') )
  8. assert_equal( "abcHI", "abcxyz".nchar(-3, 'HI') )
  9. end
  10. end