mirror of
https://github.com/mii443/AzooKeyKanaKanjiConverter.git
synced 2025-08-22 15:05:26 +00:00
Merge pull request #219 from azooKey/fix/invalid_input_range
fix: input rangeの間違った設定を修正
This commit is contained in:
@ -320,8 +320,6 @@ public final class DicdataStore {
|
||||
}
|
||||
dynamicDicdata[depth, default: []].append(data.adjustedData(adjust))
|
||||
}
|
||||
// stringToInfoにも追加(getLOUDSDataInRangeでの処理のため)
|
||||
stringToInfo.append((Array(data.ruby), (depth - 1, info.penalty)))
|
||||
}
|
||||
}
|
||||
if availableMaxIndex < characters.endIndex - 1 {
|
||||
|
@ -290,6 +290,7 @@ final class DicdataStoreTests: XCTestCase {
|
||||
sequentialInput(&c, sequence: "tesutowaーdo", inputStyle: .roman2kana)
|
||||
let result = dicdataStore.getLOUDSDataInRange(inputData: c, from: 0, toIndexRange: c.input.endIndex - 1 ..< c.input.endIndex, needTypoCorrection: false)
|
||||
XCTAssertTrue(result.contains(where: {$0.data.word == "テストワード"}))
|
||||
XCTAssertEqual(result.first(where: {$0.data.word == "テストワード"})?.inputRange, 0 ..< 11)
|
||||
}
|
||||
|
||||
// 動的ユーザ辞書の単語が通常の辞書よりも優先されることのテスト
|
||||
|
Reference in New Issue
Block a user