[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[pdf-devel] [flyspray] Unit tests for the Tokeniser Module
From: |
GNU PDF Library |
Subject: |
[pdf-devel] [flyspray] Unit tests for the Tokeniser Module |
Date: |
Tue, 27 Jan 2009 00:21:40 +0100 |
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#91 - Unit tests for the Tokeniser Module
User who did this - Jose E. Marchesi (jemarch)
----------
The following rules mandated by the PDF spec should be tested:
- "A conforming reader shall ignore comments, and treat them as a single white-space
characters"
Test a comment separating two PDF tokens (note that the end of line
character(s) after a comment are part of the comment itself):
12% foo
34
- In a string, if the character immediately following a REVERSE SOLIDUS (\) is
not one of n, r, t, b, f, (, ), \ or numbers specifying an octal value, the
REVERSE SOLIDUS should be ignored.
Test that the tokeniser honor this rule.
- In a string, an end-of-line marker appearing within a literal string without
a preceding REVERSE SOLIDUS shall be treated as a byte value of (0Ah),
irrespective of whether the end-of-line marker was a CARRIAGE RETURN (0Dh), a
LINE FEED (0ah), or both.
- High-order overflow in an octal character representation \ddd in a string
should be ignored by the tokeniser.
- In an octal character representation \ddd in a string, three octal digits
shall be used, with leading zeros as needed, if the next character of the
string is also a digit. Otherwise it can use one or two octal digits.
- In a hexadecimal string, SPACE, HORIZONTAL TAB, CARRIAGE RETURN, LINE FEED
and FORM FEED shall be ignored by the tokeniser.
- In a hexadecimal string, if there is an odd number of digits, the final digit
shall be assumed to be 0.
- In a name, A NUMBER SIGN (#) shall be written by using its 2-digit
hexadecimal code (23), preceded by a NUMBER SIGN.
- In a name, any character that is a regular character (other than NUMBER SIGN)
shall be written as itself or by using its 2-digit hexadecimal code, preceded
by the NUMBER SIGN. (would be useful to automatically test for every possible
regular character and his octal equivalence).
- In a name, any character that is not a regular character shall be written
using its 2-digit hexadecimal code, preceded by the NUMBER SIGN only. (test
negative cases with non-regular characters directly included in the name).
- In a name, regular characters that are outside the range EXCLAMATION
MARK(21h) to TILDE (7Eh) should be written using the hexadecimal notation.
(test negative cases)
- The token SOLIDUS (a slash followed by no regular characters) introduces a
unique valid name defined by the empty sequence of characters.
----------
More information can be found at the following URL:
http://www.gnupdf.org/flyspray/index.php?do=details&task_id=91#comment17
You are receiving this message because you have requested it from the Flyspray
bugtracking system. If you did not expect this message or don't want to
receive mails in future, you can change your notification settings at the URL
shown above.