Files
bare-operating-system/packages/bare-os-coreutils/test/baresay-say-bundle.test.mjs
T
Raven Scott be6ca4a40c Add cowsay-style /bin/baresay and identical /bin/say (say maps to baresay
source via build.mjs). Ship lib/baresay-engine.js for wrapping, balloons,
and cowfile parsing; default character is bear under /share/baresay/.cow.

Register commands, man pages, rebuild man/completion/posix index, sync
kernel to seeder, bump Tier-1 command count in docs to 155, and add a
test that say and baresay bundles match.
2026-04-21 19:28:55 -04:00

15 lines
589 B
JavaScript

import test from 'brittle'
import { readFile } from 'node:fs/promises'
import { dirname, join } from 'node:path'
import { fileURLToPath } from 'node:url'
const __dirname = dirname(fileURLToPath(import.meta.url))
const kernelSay = join(__dirname, '../../../kernel/bin/say')
const kernelBaresay = join(__dirname, '../../../kernel/bin/baresay')
test('shipped kernel/bin/say matches kernel/bin/baresay bundle', async (t) => {
const a = await readFile(kernelBaresay, 'utf8')
const b = await readFile(kernelSay, 'utf8')
t.is(a, b, 'say should be same concatenated bundle as baresay')
})