Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test fails when LANG=C #472

Closed
voxik opened this issue Jan 25, 2012 · 2 comments
Closed

Test fails when LANG=C #472

voxik opened this issue Jan 25, 2012 · 2 comments
Labels
Milestone

Comments

@voxik
Copy link

voxik commented Jan 25, 2012

Hello,

Running tests with Ruby 1.9.3, I experience following error:

  1) YARD::Templates::Engine::Template__builddir_build_BUILD_rubygem_yard_0_7_4_usr_share_gems_gems_yard_0_7_4_templates_default_onefile should render html
     Failure/Error: Templates::Engine.generate Registry.all(:class),
     Encoding::InvalidByteSequenceError:
       "\xC2" on US-ASCII
     # /builddir/build/BUILD/rubygem-yard-0.7.4/usr/share/gems/gems/yard-0.7.4/lib/yard/templates/template.rb:265:in `read'
     # /builddir/build/BUILD/rubygem-yard-0.7.4/usr/share/gems/gems/yard-0.7.4/lib/yard/templates/template.rb:265:in `file'
     # /builddir/build/BUILD/rubygem-yard-0.7.4/usr/share/gems/gems/yard-0.7.4/templates/default/fulldoc/html/setup.rb:44:in `block in serialize_onefile'
     # /builddir/build/BUILD/rubygem-yard-0.7.4/usr/share/gems/gems/yard-0.7.4/templates/default/fulldoc/html/setup.rb:44:in `map'
     # /builddir/build/BUILD/rubygem-yard-0.7.4/usr/share/gems/gems/yard-0.7.4/templates/default/fulldoc/html/setup.rb:44:in `serialize_onefile'
     # /builddir/build/BUILD/rubygem-yard-0.7.4/usr/share/gems/gems/yard-0.7.4/templates/default/fulldoc/html/setup.rb:6:in `init'
     # /builddir/build/BUILD/rubygem-yard-0.7.4/usr/share/gems/gems/yard-0.7.4/lib/yard/templates/template.rb:144:in `initialize'
     # /builddir/build/BUILD/rubygem-yard-0.7.4/usr/share/gems/gems/yard-0.7.4/lib/yard/templates/template.rb:86:in `new'
     # /builddir/build/BUILD/rubygem-yard-0.7.4/usr/share/gems/gems/yard-0.7.4/lib/yard/templates/template.rb:91:in `run'
     # /builddir/build/BUILD/rubygem-yard-0.7.4/usr/share/gems/gems/yard-0.7.4/lib/yard/templates/engine.rb:103:in `generate'
     # /builddir/build/BUILD/rubygem-yard-0.7.4/usr/share/gems/gems/yard-0.7.4/spec/templates/onefile_spec.rb:35:in `block (2 levels) in <top (required)>'
     # /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:80:in `instance_eval'
     # /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:80:in `block in run'
     # /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:173:in `with_around_hooks'
     # /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example.rb:77:in `run'
     # /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:355:in `block in run_examples'
     # /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:351:in `map'
     # /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:351:in `run_examples'
     # /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/example_group.rb:337:in `run'
     # /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:28:in `block (2 levels) in run'
     # /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:28:in `map'
     # /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:28:in `block in run'
     # /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/reporter.rb:34:in `report'
     # /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:25:in `run'
     # /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:80:in `run_in_process'
     # /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:69:in `run'
     # /usr/share/gems/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:10:in `block in autorun'

I can solve it by setting LANG=en_US.utf8 but that is probably not the best fix.

@lsegal lsegal closed this as completed in 5123ff4 Feb 2, 2012
@lsegal
Copy link
Owner

lsegal commented Feb 2, 2012

That specific test is only valid with a non-ASCII encoding, so we can set it there. However this points out a problem with using --one-file and --charset us-ascii, which is corrected by the above patch.

@voxik
Copy link
Author

voxik commented May 3, 2012

Thank you. It fixed my issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants