Files
dat-thang/tests/interop/cabal/cable_sexpr_boundary.js
T
divorce b735900f2e 0.0.002
ddat interop with dat js
cable interop with cabal js
ddat's frontend = dat-thang
cable fe = cable-thang
dillo support based on cel's dillo-dat
bootstrap node
xplatform support

Signed-off-by: divo <418@cryspace.space>
2026-10-19 00:17:02 -04:00

16 lines
562 B
JavaScript

'use strict'
const assert = require('assert')
const { quote, parse } = require('./cable_hyperswarm')
for (const value of [
'', 'plain text', 'quote " slash \\', 'line one\nline two',
'tabs\tand\bbackspace\f formfeed\r', 'Unicode: 媒腻㐤┖ꈳ埳 🐬'
]) {
assert.deepStrictEqual(parse('(send "general" ' + quote(value) + ')'), ['send', 'general', value])
}
assert.throws(() => parse('(send "unterminated)'), /unterminated/)
assert.throws(() => parse('(send "bad\\q")'), /unsupported S-expression escape/)
console.log('Cable S-expression IPC: PASS')