fix(fls): follow Java's formats, not Java's errors
Java stays the reference for the .fls format, but its errors are no longer copied. The Java oracle still measures Java as it is; each deliberate departure is named in the tests with its reason (JAVA_BUGS) and must really depart. The corpus - what Java itself writes - still reads exactly as in Java. - /dns/hosts: a label may start with a digit, holds no backslash, and the last one is not all digits (RFC 1123, RFC 3696); A, MX and NS are read in any case (RFC 4343); a negative TTL is invalid, so 3600 (RFC 2181). Also for the e-mail server's domain. - /mailserver/konten.txt: empty fields count (Java's StringTokenizer skips them and shifts the rest, so an empty password breaks the account); a short line alone is left out, with a warning (Java throws for the whole file); a message keeps an empty text or subject (Java's split loses it); a ";" in an unescaped subject stays in the message; CRLF lines. - /konten.txt: the last complete line is the account, also with an empty address (Java takes the last line and loses the account); CRLF lines. - Static DHCP assignments: a broken entry alone is left out (Java loses every entry after it). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// java.lang.String and java.util.StringTokenizer as FILIUS's text formats
|
||||
// use them — each differs from its JavaScript namesake.
|
||||
// java.lang.String as FILIUS's text formats use it - each differs from its
|
||||
// JavaScript namesake.
|
||||
|
||||
/** `String.trim()`: every UTF-16 unit up to U+0020 off both ends. */
|
||||
export function javaTrim(text: string): string {
|
||||
@@ -17,8 +17,3 @@ export function javaSplit(text: string, separator: string): string[] {
|
||||
while (parts.length > 0 && parts[parts.length - 1] === '') parts.pop();
|
||||
return parts;
|
||||
}
|
||||
|
||||
/** `new StringTokenizer(text, separator)`: the non-empty runs between separators. */
|
||||
export function javaTokens(text: string, separator: string): string[] {
|
||||
return text.split(separator).filter((token) => token !== '');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user