1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
This commit is contained in:
Benoit Daloze 2022-06-26 14:50:14 +02:00
parent f616e81637
commit d3d5ef0cca
74 changed files with 1201 additions and 324 deletions

View file

@ -109,4 +109,20 @@ describe "C-API Regexp function" do
thr.join
end
end
describe "rb_memicmp" do
it "returns 0 for identical strings" do
@p.rb_memcicmp('Hello', 'Hello').should == 0
end
it "returns 0 for strings which only differ in case" do
@p.rb_memcicmp('Hello', 'HELLO').should == 0
@p.rb_memcicmp('HELLO', 'Hello').should == 0
end
it "returns the difference between the first non matching characters" do
@p.rb_memcicmp('Hello', 'HELLP').should == -1
@p.rb_memcicmp('HELLp', 'Hello').should == 1
end
end
end