1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Handle junk at the end of postscript functions.

This commit is contained in:
Brendan Dahl 2012-04-18 09:48:28 -07:00
parent b02b7be879
commit e5732f489d
2 changed files with 10 additions and 1 deletions

View file

@ -77,6 +77,12 @@ describe('function', function() {
expect(function() { parse('{'); }).toThrow(
new Error('Unexpected symbol: found undefined expected 1.'));
});
it('handles junk after the end', function() {
var number = 3.3;
var program = parse('{ ' + number + ' }#');
var expectedProgram = [number];
expect(program).toMatchArray(expectedProgram);
});
});
describe('PostScriptEvaluator', function() {