[ruby] add std::wstring tests for string including a null terminator.
This commit is contained in:
parent
4009da3588
commit
89695255e6
2 changed files with 6 additions and 1 deletions
|
|
@ -35,3 +35,8 @@ begin
|
|||
rescue RuntimeError => e
|
||||
swig_assert_equal("e.message", "'x'", binding)
|
||||
end
|
||||
|
||||
x = "abc\0def"
|
||||
swig_assert_equal("Li_std_wstring.test_value(x)", "x", binding)
|
||||
swig_assert_equal("Li_std_wstring.test_ccvalue(x)", '"abc"', binding)
|
||||
swig_assert_equal("Li_std_wstring.test_wchar_overload(x)", '"abc"', binding)
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ extern "C" {
|
|||
|
||||
/**
|
||||
* If Encoding.default_internal is nil, this encoding will be used
|
||||
* when coverting from std::wstring to String object in Ruby.
|
||||
* when converting from std::wstring to String object in Ruby.
|
||||
*/
|
||||
#ifndef SWIG_RUBY_INTERNAL_ENCODING
|
||||
#define SWIG_RUBY_INTERNAL_ENCODING "UTF-8"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue