Skip to content

Bidi tests rely on assumptions about standard functions #970

Closed
@catamorphism

Description

@catamorphism

I noticed that the tests where the default bidi strategy is enabled expect numbers not to be isolated, but expect strings to be isolated. For example:

https://github.com/unicode-org/message-format-wg/blob/main/test/tests/bidi.json#L91

    {
        "description": "function-expression = \"{\" o function *(s attribute) o \"}\"",
        "src": "{1 \u200E :number \u200F}",
        "exp": "1"
    }

and

https://github.com/unicode-org/message-format-wg/blob/main/test/tests/u-options.json#L143

 {
      "locale": "ar",
      "src": "أهلاً {بالعالم :string}",
      "exp": "أهلاً \u2068بالعالم\u2069"
    }

In both cases, the function (:number or :string) is called without a u:dir or u:locale option, so I would expect either both to be isolated, or neither to be isolated. The assumption seems to be that the result of a :number gets its directionality from the underlying locale, while the result of a :string has unknown directionality (in the absence of u:dir). This should be documented in the spec.

Metadata

Metadata

Assignees

No one assigned

    Labels

    resolve-candidateThis issue appears to have been answered or resolved, and may be closed soon.test-suiteIssue pertains to tests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions