- Extend AppLanguage to 7 locales: zh-CN, zh-TW, en, ja, ko, vi, ru - Auto-detect system language via navigator.languages; fallback to English - Add BCP47 locale mapping for date formatting and sorting - Create 50 translation JSON files (5 languages × 10 namespaces, 1137 keys each) - Update language selector with native language names - Extend locale key parity test to cover all 7 languages (70 assertions) - Add VNC/RDP desktop, serial terminal, AI agent, port forwarding, and SFTP features - Add credential encryption, host metrics, session backup crypto, and zmodem bridge - Update Rust backend: desktop services, host metrics, SSH/SFTP enhancements
25 lines
765 B
TypeScript
25 lines
765 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { parseSzFiles } from '../../src/utils/zmodemSftpBridge'
|
|
|
|
describe('parseSzFiles', () => {
|
|
it('parses simple sz command', () => {
|
|
expect(parseSzFiles('sz app.log\r')).toEqual(['app.log'])
|
|
})
|
|
|
|
it('parses multiple files and skips flags', () => {
|
|
expect(parseSzFiles('sz -y a.txt b.bin\n')).toEqual(['a.txt', 'b.bin'])
|
|
})
|
|
|
|
it('uses the latest command line', () => {
|
|
expect(parseSzFiles('sz old\rsz newer.tar.gz\r')).toEqual(['newer.tar.gz'])
|
|
})
|
|
|
|
it('returns empty when no sz command', () => {
|
|
expect(parseSzFiles('ls\rrz\r')).toEqual([])
|
|
})
|
|
|
|
it('strips bracketed-paste markers', () => {
|
|
expect(parseSzFiles('\x1b[200~sz report.txt\x1b[201~\r')).toEqual(['report.txt'])
|
|
})
|
|
})
|