test(directory-picker-win32): use a synthetic path in the UTF-16 fixture
The U+5F00 case only needs that code unit in the buffer. A real-looking user desktop path does not belong in a public fixture.
This commit is contained in:
1 parent
51c242749a
commit
9a2217b74a
1 file changed
+2
-2
@@ -183,10 +183,10 @@ describe('loadWin32DialogBindings over the fake COM world', () => {
|
||||
it('reads a UTF-16 path whose BMP code unit has a zero low byte (U+5F00 开)', async () => {
|
||||
// 开 = U+5F00 → UTF-16LE bytes 00 5F. A scan that treats any zero low
|
||||
// byte as NUL truncates here and returns the nonexistent ...\安卓.
|
||||
const world = comWorld({ path: 'C:\\Users\\XIAOPAN\\Desktop\\安卓开发' })
|
||||
const world = comWorld({ path: 'C:\\fixture\\安卓开发' })
|
||||
installFakeKoffi(world)
|
||||
const bindings = await (await loadBindingsModule()).loadWin32DialogBindings()
|
||||
expect(runFolderDialog(bindings, 'Pick', vi.fn())).toBe('C:\\Users\\XIAOPAN\\Desktop\\安卓开发')
|
||||
expect(runFolderDialog(bindings, 'Pick', vi.fn())).toBe('C:\\fixture\\安卓开发')
|
||||
})
|
||||
|
||||
it('maps dismissal and the S_FALSE CoInitializeEx', async () => {
|
||||
|
||||
Reference in new issue
Block a user