summaryrefslogtreecommitdiff
path: root/test/-ext-
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-10-20 02:42:26 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-10-20 02:42:26 +0000
commit72cbec3f6d5335d0119c859df53c459e16bc9df9 (patch)
treeab4058b23681a040b4cadebe236cfdf10c98da00 /test/-ext-
parent2e32ad816398bba5557e4e5bbd7fa50b5d96aced (diff)
* util.c (mmprepare): fix for fragmental size.
* util.c (mmswap_, mmrot3_): portability improvement. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/-ext-')
-rw-r--r--test/-ext-/string/test_qsort.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/-ext-/string/test_qsort.rb b/test/-ext-/string/test_qsort.rb
new file mode 100644
index 00000000000..3a585232005
--- /dev/null
+++ b/test/-ext-/string/test_qsort.rb
@@ -0,0 +1,19 @@
+require 'test/unit'
+require "-test-/string/string"
+
+class Test_StringQSort < Test::Unit::TestCase
+ def test_qsort
+ s = Bug::String.new("xxozfxx")
+ s.qsort!
+ assert_equal("foxxxxz", s)
+ end
+
+ def test_qsort_slice
+ s = Bug::String.new("xxofzx1")
+ s.qsort!(nil, nil, 3)
+ assert_equal("fzxxxo1", s)
+ s = Bug::String.new("xxofzx231")
+ s.qsort!(nil, nil, 3)
+ assert_equal("231fzxxxo", s)
+ end
+end