You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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:in
find_tests'from ../framework/unity/auto/generate_test_runner.rb:42:in
block in run' from ../framework/unity/auto/generate_test_runner.rb:41:in
open'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.
The text was updated successfully, but these errors were encountered: