git ssb

0+

cel-desktop / ssb-pkg



Tree: ca90b5ca0579ebdcc0635288bce4978e3fb200f5

Files: ca90b5ca0579ebdcc0635288bce4978e3fb200f5 / test / test-50-arguments / main.js

720 bytesRaw
1#!/usr/bin/env node
2
3'use strict';
4
5const path = require('path');
6const assert = require('assert');
7const utils = require('../utils.js');
8
9assert(!module.parent);
10assert(__dirname === process.cwd());
11
12const target = process.argv[2] || 'host';
13const input = './test-x-index.js';
14const output = './test-output.exe';
15
16let right;
17utils.mkdirp.sync(path.dirname(output));
18
19utils.pkg.sync([
20 '--target', target,
21 '--output', output, input
22]);
23
24right = utils.spawn.sync(output, [ '42' ], {});
25assert.equal(right, '42\n');
26right = utils.spawn.sync(output, [ '-ft' ], {});
27assert.equal(right, '-ft\n');
28right = utils.spawn.sync(output, [ '--fourty-two' ], {});
29assert.equal(right, '--fourty-two\n');
30utils.vacuum.sync(output);
31

Built with git-ssb-web