Files: ca90b5ca0579ebdcc0635288bce4978e3fb200f5 / test / test-50-sigusr1 / main.js
608 bytesRaw
1 | |
2 | |
3 | 'use strict'; |
4 | |
5 | const path = require('path'); |
6 | const assert = require('assert'); |
7 | const utils = require('../utils.js'); |
8 | |
9 | assert(!module.parent); |
10 | assert(__dirname === process.cwd()); |
11 | |
12 | const target = process.argv[2] || 'host'; |
13 | const windows = process.platform === 'win32'; |
14 | const input = './test-x-index.js'; |
15 | const output = './test-output.exe'; |
16 | |
17 | if (windows) return; |
18 | |
19 | let right; |
20 | |
21 | utils.pkg.sync([ |
22 | '--target', target, |
23 | '--output', output, input |
24 | ]); |
25 | |
26 | right = utils.spawn.sync( |
27 | './' + path.basename(output), [], |
28 | { expect: null } |
29 | ); |
30 | |
31 | assert.equal(right, 'ok\n'); |
32 | utils.vacuum.sync(output); |
33 |
Built with git-ssb-web