~ubuntu-branches/ubuntu/hardy/ruby1.8/hardy-updates

« back to all changes in this revision

Viewing changes to test/nkf/test_nkf.rb

  • Committer: Bazaar Package Importer
  • Author(s): akira yamada
  • Date: 2007-03-13 22:11:58 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20070313221158-h3oql37brlaf2go2
Tags: 1.8.6-1
* new upstream version, 1.8.6.
* libruby1.8 conflicts with libopenssl-ruby1.8 (< 1.8.6) (closes: #410018)
* changed packaging style to cdbs from dbs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
require 'test/unit'
 
2
require 'nkf'
 
3
 
 
4
class TestNKF < Test::Unit::TestCase
 
5
  EUC_STR = "\xa5\xaa\xa5\xd6\xa5\xb8\xa5\xa7\xa5\xaf\xa5\xc8\xbb\xd8\xb8\xfe\
 
6
\xa5\xb9\xa5\xaf\xa5\xea\xa5\xd7\xa5\xc8\xb8\xc0\xb8\xec\
 
7
Ruby"
 
8
 
 
9
  def test_guess
 
10
    str_euc = EUC_STR
 
11
    str_jis = NKF.nkf('-j', str_euc)
 
12
    assert_equal(::NKF::JIS, NKF.guess(str_jis))
 
13
    assert_equal(::NKF::EUC, NKF.guess(str_euc))
 
14
  end
 
15
 
 
16
end