Permalink
Browse files

Added unicode tests.

  • Loading branch information...
1 parent 79dfa54 commit 42e27e857cd59aa4b4895e44b975deebf52abedd @rauchg rauchg committed Sep 3, 2011
Showing with 25 additions and 0 deletions.
  1. +10 −0 support/test-runner/app.js
  2. +15 −0 test/socket.test.js
@@ -296,4 +296,14 @@ suite('socket.test.js', function () {
});
});
+ server('test sending unicode', function (io) {
+ io.sockets.on('connection', function (socket) {
+ socket.on('message', function (msg) {
+ if (msg.test == "\u2028") {
+ socket.emit('done');
+ }
+ });
+ });
+ });
+
});
View
@@ -340,6 +340,21 @@
socket.disconnect();
next();
});
+ },
+
+ 'test sending unicode': function (next) {
+ var socket = create();
+
+ socket.on('error', function (msg) {
+ throw new Error(msg || 'Received an error');
+ });
+
+ socket.json.send({ test: "\u2028" });
+
+ socket.on('done', function () {
+ socket.disconnect();
+ next();
+ });
}
};

0 comments on commit 42e27e8

Please sign in to comment.