Release 0.9.1-3 with RetroBrowser, PPC audio, XP diagnostics and LP64 repair

This commit is contained in:
2026-11-29 13:41:59 +00:00
parent 15fde09e9e
commit 679dada6ec
117 changed files with 2473 additions and 63 deletions

5
browser/test.mjs Normal file
View File

@@ -0,0 +1,5 @@
import assert from 'node:assert/strict';import {test} from 'node:test';import {defaults,validate} from './config.mjs';import {T,packet,Parser,rle565} from './protocol.mjs';import {adpcm} from './media.mjs';
test('configuration bounds and secure defaults',()=>{assert.equal(validate(defaults).enabled,false);assert.throws(()=>validate({...defaults,enabled:true}));assert.throws(()=>validate({...defaults,bind:'0.0.0.0'}));assert.throws(()=>validate({...defaults,fps:99}));assert.throws(()=>validate({...defaults,engine:'/bin/sh'}));});
test('packet fragmentation and network order',()=>{let got=[];const p=new Parser((t,b)=>got.push([t,b.toString()]));const raw=Buffer.concat([packet(T.AUTH,'abc'),packet(T.NAV,'url')]);for(const v of raw)p.feed(Buffer.from([v]));assert.deepEqual(got,[[T.AUTH,'abc'],[T.NAV,'url']]);assert.throws(()=>p.feed(Buffer.alloc(16)));});
test('RLE565',()=>{assert.equal(rle565(Buffer.from('00f800f8e007','hex')).toString('hex'),'0002f800000107e0');});
test('ADPCM independent block',()=>{assert.equal(adpcm(Buffer.from('0000000000000000','hex'),1).toString('hex'),'000000000000');});