diff --git a/lib/js.jar b/lib/js.jar index 37316edf4..2714a90f6 100644 Binary files a/lib/js.jar and b/lib/js.jar differ diff --git a/test/cases/inlinecomment.js b/test/cases/inlinecomment.js new file mode 100644 index 000000000..883d5f0b9 --- /dev/null +++ b/test/cases/inlinecomment.js @@ -0,0 +1,2 @@ +/** Inline Comment 1 */ this.test = function(){} +/** Inline Comment 2 */ this.test2 = function(){}; diff --git a/test/runner.js b/test/runner.js index 7e0cb5e24..dbea1cb1a 100644 --- a/test/runner.js +++ b/test/runner.js @@ -136,6 +136,7 @@ testFile('test/t/cases/exportstag4.js'); testFile('test/t/cases/exceptiontag.js'); testFile('test/t/cases/globaltag.js'); testFile('test/t/cases/ignoretag.js'); +testFile('test/t/cases/inlinecomment.js'); testFile('test/t/cases/lends.js'); testFile('test/t/cases/lends2.js'); testFile('test/t/cases/lendsglobal.js'); diff --git a/test/t/cases/inlinecomment.js b/test/t/cases/inlinecomment.js new file mode 100644 index 000000000..e15fa8163 --- /dev/null +++ b/test/t/cases/inlinecomment.js @@ -0,0 +1,10 @@ +(function() { + var docSet = testhelpers.getDocSetFromFile('test/cases/inlinecomment.js'), + t = docSet.getByLongname('test'), + t2 = docSet.getByLongname('test2'); + + test('When there is an inline comment on a line ending with no semicolon, that comment and the next comment are still captured', function() { + assert.equal(t.length, 1, "Inline comment on line without semicolon is captured"); + assert.equal(t2.length, 1, "Inline comment on line after line without semicolon is captured"); + }); +})();