pdf.js/test/unit/unit_test.html
Jonas Jenwald 088ce6c009 Add a unit-test to check that ProblematicCharRanges contains valid entries
When adding new entries to `ProblematicCharRanges`, you have to be careful to not make any mistakes since that could cause glyph mapping issues.
Currently the existing reference tests should probably help catch any errors, but based on experience I think that having a unit-test which specifically checks `ProblematicCharRanges` would be both helpful and timesaving when modifying/reviewing changes to this code.

Hence this patch which adds a function (and unit-test) that is used to validate the entries in `ProblematicCharRanges`, and also checks that we don't accidentally add more character ranges than the Private Use Area can actually contain.
The way that the validation code, and thus the unit-test, is implemented also means that we have an easy way to tell how much of the Private Use Area is potentially utilized by re-mapped characters.
2016-08-27 11:56:00 +02:00

37 lines
1.3 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>pdf.js unit test</title>
<link rel="stylesheet" type="text/css" href="../../node_modules/jasmine-core/lib/jasmine-core/jasmine.css">
<script src="../../node_modules/requirejs/require.js"></script>
<script src="../../node_modules/jasmine-core/lib/jasmine-core/jasmine.js"></script>
<script src="../../node_modules/jasmine-core/lib/jasmine-core/jasmine-html.js"></script>
<script src="testreporter.js"></script>
<script src="jasmine-boot.js"></script>
<!-- include spec files here... -->
<script src="primitives_spec.js"></script>
<script src="cff_parser_spec.js"></script>
<script src="type1_parser_spec.js"></script>
<script src="fonts_spec.js"></script>
<script src="unicode_spec.js"></script>
<script src="function_spec.js"></script>
<script src="crypto_spec.js"></script>
<script src="evaluator_spec.js"></script>
<script src="stream_spec.js"></script>
<script src="parser_spec.js"></script>
<script src="api_spec.js"></script>
<script src="metadata_spec.js"></script>
<script src="ui_utils_spec.js"></script>
<script src="util_spec.js"></script>
<script src="cmap_spec.js"></script>
<script src="annotation_layer_spec.js"></script>
<script src="network_spec.js"></script>
<script src="dom_utils_spec.js"></script>
</head>
<body>
</body>
</html>