gems/rspec-core-3.0.0.beta1/lib/rspec/core/formatters/snippet_extractor.rb:91: unknown regexp options - pa (SyntaxError) #1179

Closed
ouguangqian opened this Issue Nov 14, 2013 · 8 comments

Projects

None yet

4 participants

@ouguangqian

OS :WIN7
RUBY_VERSION: ruby 2.0.0p247 (2013-06-27) [i386-mingw32]
rspec (3.0.0.beta1, 2.14.1)
rspec-core (3.0.0.beta1, 2.14.
rspec-expectations (3.0.0.beta
rspec-mocks (3.0.0.beta1, 2.14
rspec-support (3.0.0.beta1)

when i execute my script the error follows:

D:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': D:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0.beta1/lib/rspec/core/formatters/snippet_extractor.rb:91: unknown regexp options - pa (SyntaxError)
    from D:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
    from D:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0.beta1/lib/rspec/core/formatters/html_formatter.rb:121:in `extra_failure_content'
    from D:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0.beta1/lib/rspec/core/formatters/html_formatter.rb:94:in `example_failed'
    from D:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0.beta1/lib/rspec/core/reporter.rb:122:in `block in notify'
    from D:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0.beta1/lib/rspec/core/reporter.rb:121:in `each'
    from D:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0.beta1/lib/rspec/core/reporter.rb:121:in `notify'
    from D:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0.beta1/lib/rspec/core/reporter.rb:87:in `example_failed'
    from D:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0.beta1/lib/rspec/core/example.rb:257:in `finish'
    from D:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0.beta1/lib/rspec/core/example.rb:224:in `fail_with_exception'
    from D:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0.beta1/lib/rspec/core/example_group.rb:424:in `block in fail_filtered_examples'
    from D:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0.beta1/lib/rspec/core/example_group.rb:424:in `each'

and my script startup.rb follows:

#encoding:utf-8

require 'childprocess'

test_cases = Dir.glob('**/*_spec.rb')

caps_flags = ['ie','firefox','chrome']

process_arr = []
test_cases.each do | test_file |
  caps_flags.each do | flag |
    result_html = flag+'_result.html'
    process = ChildProcess.build("rspec.bat","-fh","-o","#{result_html}","#{test_file}")
    #process.io.stdout = process.io.stderr = file
    process.environment["flag"] = flag
    process.start
    process_arr << process
  end

  process_arr.each do |p|
    begin
      p.poll_for_exit(600)
    rescue ChildProcess::TimeoutError
      p.stop
    end
  end
end
#file.close

please help me! thanks a lot!

@JonRowe
Member
JonRowe commented Nov 14, 2013

Well that makes no sense, can you show us what that file contains on your system? The error doesn't seem to match up with the line number.

@ouguangqian

well,thank you for your reply! I get the file .zip,please rename the file *.zip.png to *.zip,thank you
test zip

@ouguangqian

I put the files into test.zip please compress it ! Thank you !
best wishes!

2013/11/14 Jon Rowe notifications@github.com

Well that makes no sense, can you show us what that file contains on your
system? The error doesn't seem to match up with the line number.


Reply to this email directly or view it on GitHubhttps://github.com/rspec/rspec-core/issues/1179#issuecomment-28472324
.

@ouguangqian

Hello,I execute the programe again today, the log is follows:

E:\WD_Step_by_Step\QM_AutoTest\DEMO\sales\IE\login_page>rspec -fh -o 1.html
test
cases_spec
D:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in
require': D :/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0.beta1/lib/rspec/core/formatt ers/snippet_extractor.rb:91: unknown regexp options - pa (SyntaxError) from D:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:inrequire'
from
D:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0.beta1/lib/rspe
c/core/formatters/html_formatter.rb:121:in extra_failure_content' from D:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0.beta1/lib/rspe c/core/formatters/html_formatter.rb:94:inexample_failed'
from
D:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0.beta1/lib/rspe
c/core/reporter.rb:122:in block in notify' from D:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0.beta1/lib/rspe c/core/reporter.rb:121:ineach'
from
D:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0.beta1/lib/rspe
c/core/reporter.rb:121:in notify' from D:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0.beta1/lib/rspe c/core/reporter.rb:87:inexample_failed'
from
D:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0.beta1/lib/rspe
c/core/example.rb:257:in `finish'
from
D:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0.beta1/lib/rspe

so ,onece i execute the file and out put into format html,the log is not
OK,but into other formats is OK

2013/11/14 Å·¹âǬ ou.guangqian@gmail.com

I put the files into test.zip please compress it ! Thank you !
best wishes!

2013/11/14 Jon Rowe notifications@github.com

Well that makes no sense, can you show us what that file contains on your
system? The error doesn't seem to match up with the line number.

¡ª
Reply to this email directly or view it on GitHubhttps://github.com/rspec/rspec-core/issues/1179#issuecomment-28472324
.

@JonRowe
Member
JonRowe commented Nov 17, 2013

Hi I meant the file D:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0.beta1/lib/rspec/core/formatters/snippet_extractor.rb and if you could put that into a gist rather than uploading files that would be super awesome.

@ouguangqian

2013/11/17 Jon Rowe notifications@github.com

Hi I meant the file
D:/Ruby200/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0.beta1/lib/rspec/core/formatters/snippet_extractor.rband if you could put that into a gist rather than uploading files that
would be super awesome.


Reply to this email directly or view it on GitHubhttps://github.com/rspec/rspec-core/issues/1179#issuecomment-28642345
.

@mikegee
mikegee commented Dec 14, 2013

@ouguangqian If this is still a problem for you, please copy & paste the content of that file on your system to a new gist at gist.github.com, and provide the link to that gist here.

@myronmarston
Member

We're not able to reproduce this and it seems it's gotten stale. Closing, but we can reopen if anyone else hits this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment