Bug in SGF Parsing canonical data?

Either I’m not understanding something or there’s an inconsistency/bug in the SGF Parsing canonical data.

Line 323 has (roughly):

"description": "escaped t and n in property value are just letters, not whitespace",
"encoded": "(;A[\\t = t and \\n = n])",
"expected": "A": ["t = t and n = n"]

Line 370 has (roughly):

"description": "escaped property",
"encoded": "(;A[\\]b\\nc\\nd\\t\\te \\n\\]])",
"expected": "A": ["]b\\nc\\nd  e \\n]"]

Unless I’m missing something, these two tests treat the same inputs differently.

I think the latter test case means to have an additional \ in there, such that there is a \\\\ which becomes \\ in the output, followed by an unescaped n but I’m not sure. This test was introduced in the original commit for this file (by cmccandless) and hasn’t changed since.

The problem description says,

  • \ is the escape character. Any non-whitespace character after \ is inserted as-is. Any whitespace character after \ follows the above rules. Note that SGF does not have escape sequences for whitespace characters such as \t or \n.

I believe this supports the former test and my suspicion that the latter test has a bug.

I think that case has been superseded by the one on line 338? It’s hard to follow with all the UUIDs , but I think that’s what the reimplemented field is saying.

Ooh! Alright. I had no clue what “reimplemented” was supposed to mean. That makes sense. I excluded it in the tests.toml. It would be nice if the configlet tool handled those.