omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / tests / universal / source-aware / red.mjs
| 1 | import {spawnSync} from 'node:child_process'; |
| 2 | import {unit,expected} from './fixtures.mjs'; |
| 3 | let rows=[]; |
| 4 | for(let [command,mode] of [['encode',1],['decode',2],['identity',3],['provenance',4],['replay',5]]){ |
| 5 | const input=unit(),r=spawnSync('sh',['tools/source-aware/sa',command],{input}); |
| 6 | rows.push({command,status:r.status,ok:r.status===0&&r.stdout.equals(expected(mode,input))}); |
| 7 | } |
| 8 | console.log(JSON.stringify({phase:'RED',requested:rows.length,executed:rows.length,passed:rows.filter(r=>r.ok).length,rows},null,2)); |
| 9 | process.exit(rows.every(r=>r.ok)?0:1); |