Initial commit

This commit is contained in:
Marcelo
2025-11-20 15:27:34 -06:00
commit cc72c9fc5d
3221 changed files with 737477 additions and 0 deletions

28
node_modules/cliss/test/main.test.pipe.stdin.js generated vendored Normal file
View File

@@ -0,0 +1,28 @@
'use strict';
const assert = require('assert');
const path = require('path');
const fs = require('fs');
const { exec } = require('child_process');
const testsPath = path.resolve(__dirname, './specs/cliss-options');
describe('stdin', function(){
it('command.pipe.stdin', function(){
return execCli(testsPath, 'nested1')
.then(result => assert.equal(result, 'nested1:viastdinoptionsPipe'));
})
})
function execCli(moduleCliPath, args) {
return new Promise((resolve, reject) => {
const cmd = `echo "VIASTDIN" | node ${moduleCliPath} ${args}`;
exec(cmd, (err, stdout, stderr) => {
if (err || stderr) {
return reject(err || stderr);
}
resolve(stdout.replace(/ +$/gm, '').replace(/\n$/, ''));
}).stdin.end();
});
}