fix: 排除破坏行框的组合字符
This commit is contained in:
@@ -98,6 +98,18 @@ describe('generateMosaic', () => {
|
||||
expect(expanded.outputLength).toBe(expanded.inputLength * 10)
|
||||
})
|
||||
|
||||
it('不生成可能跳出正常行框的 Unicode 组合符', () => {
|
||||
const outputs = Array.from({ length: 20 }, (_, seed) =>
|
||||
generateMosaic(SOURCE, [], {
|
||||
volume: 1000,
|
||||
disorder: 100,
|
||||
seed,
|
||||
}).output,
|
||||
).join('')
|
||||
|
||||
expect(outputs).not.toMatch(/\p{Mark}/u)
|
||||
})
|
||||
|
||||
it('相同种子可复现,不同种子会重新侵蚀', () => {
|
||||
const candidates = selectKeywords(SOURCE, 14, 1)
|
||||
const first = generateMosaic(SOURCE, candidates, {
|
||||
|
||||
Reference in New Issue
Block a user