summaryrefslogtreecommitdiff
path: root/trunk/test/iconv/test_partial.rb
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-25 15:13:14 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-25 15:13:14 +0000
commitd0233291bc8a5068e52c69c210e5979e5324b5bc (patch)
tree7d9459449c33792c63eeb7baa071e76352e0baab /trunk/test/iconv/test_partial.rb
parent0dc342de848a642ecce8db697b8fecd83a63e117 (diff)
parent72eaacaa15256ab95c3b52ea386f88586fb9da40 (diff)
re-adding tag v1_9_0_4 as an alias of trunk@18848v1_9_0_4
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_9_0_4@18849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'trunk/test/iconv/test_partial.rb')
-rw-r--r--trunk/test/iconv/test_partial.rb41
1 files changed, 0 insertions, 41 deletions
diff --git a/trunk/test/iconv/test_partial.rb b/trunk/test/iconv/test_partial.rb
deleted file mode 100644
index aa4d0ba250..0000000000
--- a/trunk/test/iconv/test_partial.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-require File.join(File.dirname(__FILE__), "utils.rb")
-
-class TestIconv::Partial < TestIconv
- def test_partial_ascii
- c = Iconv.open(ASCII, ASCII)
- ref = '[ruby-core:17092]'
- rescue
- return
- else
- assert_equal("abc", c.iconv("abc"))
- assert_equal("c", c.iconv("abc", 2), "#{ref}: with start")
- assert_equal("c", c.iconv("abc", 2, 1), "#{ref}: with start, length")
- assert_equal("c", c.iconv("abc", 2, 5), "#{ref}: with start, longer length")
- assert_equal("bc", c.iconv("abc", -2), "#{ref}: with nagative start")
- assert_equal("b", c.iconv("abc", -2, 1), "#{ref}: with nagative start, length")
- assert_equal("bc", c.iconv("abc", -2, 5), "#{ref}: with nagative start, longer length")
- assert_equal("", c.iconv("abc", 5), "#{ref}: with OOB")
- assert_equal("", c.iconv("abc", 5, 2), "#{ref}: with OOB, length")
- ensure
- c.close if c
- end
-
- def test_partial_euc2sjis
- c = Iconv.open('SHIFT_JIS', 'EUC-JP')
- rescue
- return
- else
- assert_equal(SJIS_STR[0, 2], c.iconv(EUCJ_STR, 0, 2))
- assert_equal(SJIS_STR, c.iconv(EUCJ_STR, 0, 20))
- assert_equal(SJIS_STR[2..-1], c.iconv(EUCJ_STR, 2))
- assert_equal(SJIS_STR[2, 2], c.iconv(EUCJ_STR, 2, 2))
- assert_equal(SJIS_STR[2..-1], c.iconv(EUCJ_STR, 2, 20))
- assert_equal(SJIS_STR[-4..-1], c.iconv(EUCJ_STR, -4))
- assert_equal(SJIS_STR[-4, 2], c.iconv(EUCJ_STR, -4, 2))
- assert_equal(SJIS_STR[-4..-1], c.iconv(EUCJ_STR, -4, 20))
- assert_equal("", c.iconv(EUCJ_STR, 20))
- assert_equal("", c.iconv(EUCJ_STR, 20, 2))
- ensure
- c.close
- end
-end if defined?(TestIconv)