3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-20 23:25:43 +01:00

Answer product-owner round 1: 1 🔴, 5 🟡 (0 misread); add the licence notice, link each document to its page, stop a failed fetch reaching the corpus, keep raw folders out of the repo

This commit is contained in:
2026-11-05 00:17:32 +01:00
committed by Lillem4n
parent 8fee35a63b
commit 1e3d6e5d65
51 changed files with 3164 additions and 1055 deletions
+25
View File
@@ -0,0 +1,25 @@
import assert from 'node:assert/strict'
import { spawnSync } from 'node:child_process'
import { test } from 'node:test'
const repo = new URL('..', import.meta.url).pathname
function run(...args) {
return spawnSync('sh', ['corpus-gathering/run.sh', ...args], { cwd: repo, encoding: 'utf8' })
}
test('refuses a raw folder inside the repo', () => {
const { status, stderr } = run('corpus')
assert.equal(status, 2)
assert.match(stderr, /outside the repo/)
})
test('refuses the repo itself as the raw folder', () => {
assert.equal(run('.').status, 2)
})
test('names its argument when it is missing', () => {
const { status, stderr } = run()
assert.equal(status, 2)
assert.match(stderr, /Usage: corpus-gathering\/run\.sh <raw folder>/)
})