Skip to content

Commit

Permalink
fix "toanf" with !oa_uy_tone1
Browse files Browse the repository at this point in the history
  • Loading branch information
dinhngtu committed Aug 24, 2022
1 parent 7aa0f6a commit e3b4284
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Telex/TelexEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ bool TelexEngine::FindTable(_Out_ map_iterator* it) const {
*it = valid_v_gi.find(_v);
return *it != valid_v_gi.end();
} else {
if (!_config.oa_uy_tone1) {
if (!_c2.size() && !_config.oa_uy_tone1) {
*it = valid_v_oa_uy.find(_v);
if (*it != valid_v_oa_uy.end()) {
return true;
Expand Down
7 changes: 7 additions & 0 deletions VietTypeUnitTests/TestTelex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,13 @@ TEST_CLASS(TestTelex) {
TelexEngine e(config1);
TestInvalidWord(e, L"dodongf", L"dodongf");
}

TEST_METHOD(TestConfigOaUy) {
auto config1 = config;
config1.oa_uy_tone1 = false;
TelexEngine e(config1);
TestValidWord(e, L"to\xe0n", L"toanf");
}
};

}

0 comments on commit e3b4284

Please sign in to comment.