Skip to content
This repository has been archived by the owner on Jan 3, 2020. It is now read-only.

Regexp spec compliance #146

Merged
merged 33 commits into from
Jul 4, 2019
Merged

Regexp spec compliance #146

merged 33 commits into from
Jul 4, 2019

Conversation

lopopolo
Copy link
Member

@lopopolo lopopolo commented Jul 4, 2019

mruby crate is "fully" ruby/spec compliant for Regexp, MatchData, and String#scan. Running the specs with spec-runner gives the following results:

Passed 886, skipped 195, not implemented 0, failed 0 specs.

Detailed run details below:

$ RUST_BACKTRACE=1 cargo run --bin spec-runner regexp/shared/*.rb regexp/*.rb matchdata/shared/*.rb matchdata/*.rb string/shared/*.rb string/fixtures/*.rb string/scan_spec.rb
mruby 2.0 [2.0.1-11]


In Regexp#===:

.....

In Regexp#casefold?:

.

In Regexp.compile:

....

In Regexp.compile given a String:

.S.....SSSSS.S.....SSSSS

In Regexp.compile given a String with escaped characters:

.S...............S...........................................................................................S.S.S.S.SS.S.S...S.S

In Regexp.compile given a String with escaped characters:

.S.......S.S.......S.............................................S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S.S...............................................S.S.S.S.S.S.S.S...S.S

In Regexp.compile given a Regexp:

...SSSSS...SSSSS

In Regexp#encoding:

SSSSSSSSSSSS

In Regexp#eql?:

.....

In Regexp#==:

.....

In Regexp.escape:

..S.S

In Regexp#fixed_encoding?:

.....SS.

In Regexp#hash:

...

In Regexp#initialize:

.SS

In Regexp#inspect:

........

In Regexp.last_match:

..

In Regexp#=~:

....

In Regexp#match:

....S...

In Regexp#match with [string, position] when given a positive position:

..

In Regexp#match with [string, position] when given a negative position:

..

In Regexp#match with [string, position] when passed a block:

......

In Regexp#~:

.

In Regexp#named_captures:

......

In Regexp#names:

......

In Regexp.new:

....

In Regexp.new given a String:

.S.....SSSSS.S.....SSSSS

In Regexp.new given a String with escaped characters:

..S.......................S.........................................................................................................................................S..S..S..S..S..S..S..S.....S..S

In Regexp.new given a String with escaped characters:

..S...........S..S...........S....................................................................S..S..S..S..S..S..S.S..S..S..S..S..S..S..S..S..S..S..S..S..S.......................................................................S..S..S..S..S..S..S..S.....S..S

In Regexp.new given a Regexp:

...SSSSS...SSSSS

In Regexp.new given a Fixnum:

.

In Regexp.new given a Float:

.

In Regexp#options:

...S.....

In Regexp.quote:

..S.S

In Regexp#source:

..SS

In Regexp#to_s:

..........

In Regexp.try_convert:

...

In Regexp.union:

...SSSSSSS.SSSSSSSSSSSSS..

In MatchData#begin:

....

In MatchData#captures:

.

In MatchData#[]:

...

In MatchData#[Symbol]:

.......S

In MatchData#end:

....

In MatchData#eql?:

....

In MatchData#==:

....

In MatchData#hash:

.

In MatchData#inspect:

...

In MatchData#length:

.

In MatchData#names:

......

In MatchData#offset:

....

In MatchData#post_match:

.SS

In MatchData#pre_match:

.SS

In MatchData#regexp:

..

In MatchData#size:

.

In MatchData#string:

..

In MatchData#to_a:

.

In MatchData#to_s:

.

In MatchData#values_at:

.

In MatchData#values_at when passed a Range:

..mutable

In String#scan:

........SSSS

In String#scan with pattern and block:

......SSSS.

Passed 886, skipped 195, not implemented 0, failed 0 specs.

Avoid calling itself via funcall to work around a stack split that is
documented in GH-145.

The Clone implementation panics if attempting to clone a Value with ruby
type == ruby::Data. We cannot safely increase the ref count on the Rc
smart pointer that backs the void *.

Fixes GH-3.
@lopopolo lopopolo merged commit 5afdb0a into master Jul 4, 2019
@lopopolo lopopolo deleted the regexp-spec-compliance branch July 4, 2019 23:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant