THRIFT-3374 Ruby TJSONProtocol fails to unescape string values
This closes #640
diff --git a/test/rb/integration/TestClient.rb b/test/rb/integration/TestClient.rb
index d04f475..8fd6336 100755
--- a/test/rb/integration/TestClient.rb
+++ b/test/rb/integration/TestClient.rb
@@ -89,7 +89,16 @@
def test_string
p 'test_string'
- assert_equal(@client.testString('string'), 'string')
+ test_string =
+ 'quote: \" backslash:' +
+ ' forwardslash-escaped: \/ ' +
+ ' backspace: \b formfeed: \f newline: \n return: \r tab: ' +
+ ' now-all-of-them-together: "\\\/\b\n\r\t' +
+ ' now-a-bunch-of-junk: !@#$%&()(&%$#{}{}<><><' +
+ ' char-to-test-json-parsing: ]] \"]] \\" }}}{ [[[ '
+
+ result_string = @client.testString(test_string)
+ assert_equal(test_string, result_string.force_encoding(Encoding::UTF_8))
end
def test_bool