TenantAtlas/apps/platform/.pnpm-store/v10/files/d2/8a0d92fd9419e8f6986f147e144b6fa92158ab49f053d945c4165e3af870961887d2704231d25b4092400146667e237fee6e1045ccf63b2651799072bf0ac2
ahmido 1fec9c6f9d
Some checks failed
Main Confidence / confidence (push) Failing after 45s
feat: compress governance operator outcomes (#253)
## Summary
- introduce surface-aware compressed governance outcomes and reuse the shared truth/explanation seams for operator-first summaries
- apply the compressed outcome hierarchy across baseline, evidence, review, review-pack, canonical review/evidence, and artifact-oriented operation-run surfaces
- expand spec 214 fixtures and Pest coverage, and fix tenant-panel route assertions by generating explicit tenant-panel URLs in the affected Filament tests

## Validation
- `cd apps/platform && ./vendor/bin/sail bin pint --dirty --format agent`
- focused governance compression suite from `specs/214-governance-outcome-compression/quickstart.md` passed (`68` tests, `445` assertions)
- `cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/Filament/InventoryItemResourceTest.php tests/Feature/Filament/BackupSetUiEnforcementTest.php tests/Feature/Filament/RestoreRunUiEnforcementTest.php` passed (`18` tests, `81` assertions)

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #253
2026-04-19 12:30:36 +00:00

45 lines
1.4 KiB
Plaintext

'use strict';
var test = require('tape');
var parse = require('../').parse;
test('parse shell commands', function (t) {
t.same(parse(''), [], 'parses an empty string');
t['throws'](
function () { parse('${}'); },
Error,
'empty substitution throws'
);
t['throws'](
function () { parse('${'); },
Error,
'incomplete substitution throws'
);
t.same(parse('a \'b\' "c"'), ['a', 'b', 'c']);
t.same(
parse('beep "boop" \'foo bar baz\' "it\'s \\"so\\" groovy"'),
['beep', 'boop', 'foo bar baz', 'it\'s "so" groovy']
);
t.same(parse('a b\\ c d'), ['a', 'b c', 'd']);
t.same(parse('\\$beep bo\\`op'), ['$beep', 'bo`op']);
t.same(parse('echo "foo = \\"foo\\""'), ['echo', 'foo = "foo"']);
t.same(parse(''), []);
t.same(parse(' '), []);
t.same(parse('\t'), []);
t.same(parse('a"b c d"e'), ['ab c de']);
t.same(parse('a\\ b"c d"\\ e f'), ['a bc d e', 'f']);
t.same(parse('a\\ b"c d"\\ e\'f g\' h'), ['a bc d ef g', 'h']);
t.same(parse("x \"bl'a\"'h'"), ['x', "bl'ah"]);
t.same(parse("x bl^'a^'h'", {}, { escape: '^' }), ['x', "bl'a'h"]);
t.same(parse('abcH def', {}, { escape: 'H' }), ['abc def']);
t.deepEqual(parse('# abc def ghi'), [{ comment: ' abc def ghi' }], 'start-of-line comment content is unparsed');
t.deepEqual(parse('xyz # abc def ghi'), ['xyz', { comment: ' abc def ghi' }], 'comment content is unparsed');
t.deepEqual(parse('-x "" -y'), ['-x', '', '-y'], 'empty string is preserved');
t.end();
});