core.js: Adding some tests for Unicode characters
in name and suffixes.
Change-Id: I1adac2916493923935f9252735ca9ae3cf5377c2
diff --git a/test/integration/test-new-server.js b/test/integration/test-new-server.js
index 0a13b3f..e601f2a 100644
--- a/test/integration/test-new-server.js
+++ b/test/integration/test-new-server.js
@@ -8,7 +8,7 @@
var config = require('./default-config');
var timeouts = require('./timeouts');
-var NAME_PREFIX = 'new-server-testing/';
+var NAME_PREFIX = 'new-server-testing-چשઑᜰ/';
var fooService = {
foo: function(ctx, serverCall) {
diff --git a/test/integration/test-server-call.js b/test/integration/test-server-call.js
index 84abd12..a89c8f5 100644
--- a/test/integration/test-server-call.js
+++ b/test/integration/test-server-call.js
@@ -88,6 +88,23 @@
});
});
+test('Test Unicode suffix is available in context', function(assert) {
+ serve('a/b', dispatcher, function(err, res, end) {
+ assert.error(err, 'should not error on serve(...)');
+ var client = res.runtime.newClient();
+ var ctx = res.runtime.getContext();
+ client.bindTo(ctx, 'a/b/چשઑᜰ', function(err, service) {
+ assert.error(err, 'should not error on runtime.bindTo(...)');
+
+ service.getSuffix(ctx, function(err, suffix) {
+ assert.error(err, 'should not error on getSuffix(...)');
+ assert.equal(suffix, 'چשઑᜰ');
+ end(assert);
+ });
+ });
+ });
+});
+
test('Test empty suffix is available in context - ', function(assert) {
serve('a/b', dispatcher, function(err, res, end) {
assert.error(err, 'should not error on serve(...)');