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_Runner generation and invalid byte sequence error #43

Closed
lwriemen opened this issue Jun 7, 2013 · 0 comments
Closed

Test_Runner generation and invalid byte sequence error #43

lwriemen opened this issue Jun 7, 2013 · 0 comments

Comments

@lwriemen
Copy link

lwriemen commented Jun 7, 2013

Our builds were previously MS Windows shell only. I've been adapting our test framework to work under cygwin, and I ran into problems where generate_test_runner.rb was parsing a C file that had the degree symbol <0xB0> in line comments. The following error was generated:
../framework/unity/auto/generate_test_runner.rb:76:in gsub': invalid byte sequence in UTF-8 (ArgumentError) from ../framework/unity/auto/generate_test_runner.rb:76:infind_tests'
from ../framework/unity/auto/generate_test_runner.rb:42:in block in run' from ../framework/unity/auto/generate_test_runner.rb:41:inopen'
from ../framework/unity/auto/generate_test_runner.rb:41:in run' from ../framework/unity/auto/generate_test_runner.rb:308:in

'
After much searching, I found that changing line 41 of generate_test_runner.rb from:
File.open(input_file, 'r') do |input|
to:
File.open(input_file, 'r:ISO-8859-1') do |input|
corrected the problem. I'm not sure if this is the best way to fix the problem, or if it just should be in an app note.

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

No branches or pull requests

2 participants