Permalink
Browse files

Test payload length with leading colon

  • Loading branch information...
1 parent f659aa5 commit 69bfc5494987e004d6e3aa67090d962f36802bd1 @josh josh committed with Sep 28, 2010
Showing with 4 additions and 0 deletions.
  1. +4 −0 test/test.js
View
@@ -27,6 +27,10 @@ var ns = require('../lib/ns');
ex(as, '03:', 'Invalid netstring with leading 0');
ex(as, '00:', 'Invalid netstring with leading 0');
},
+ 'leading colon' : function(as) {
+ ex(as, ':', 'Invalid netstring with leading \':\'');
+ ex(as, ':a', 'Invalid netstring with leading \':\'');
+ },
'invalid char' : function(as) {
ex(as, '3;', 'Unexpected character \';\' found at offset 1');
ex(as, ';', 'Unexpected character \';\' found at offset 0');

0 comments on commit 69bfc54

Please sign in to comment.