Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set boundary_property with complex character and EOT #4903

Merged
merged 2 commits into from
May 22, 2024

Conversation

makotokato
Copy link
Member

Fixes #4446.

If EOT after SA, we should mark as Letter (SA).

@sffc sffc requested review from eggrobin and removed request for sffc May 14, 2024 18:20

assert_eq!(iter.next(), Some(42), "after 4th word and next is EOT");
assert_eq!(iter.word_type(), WordType::Letter, "letter");
assert!(iter.is_word_like(), "Letter(Thai) is true");
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: I think it's worth adding extra assertions at the end of the test


    assert_eq!(iter.next(), None, "EOT");
    assert_eq!(iter.word_type(), WordType::None, "none");
    assert!(!iter.is_word_like(), "None is false");

to make sure we fully test every word in the testcase. Same for other testcase in this file.

However, iter.word_type() returns WordType::Letter in rule_status_th(). I've tried added the same three assertions in rule_status_numeric_eof(), and it matches the expectations.

@makotokato Could you check if this is a bug?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EOT seems to return previous word_type. I didn't define whether we should return any value...

@robertbastian robertbastian mentioned this pull request May 22, 2024
19 tasks
Copy link
Contributor

@aethanyc aethanyc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks!

@makotokato makotokato merged commit 9150b7b into unicode-org:main May 22, 2024
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Last segment of Thai script is always marked as not word-like
2 participants