Files: 65191f9a9664f013ebe726bb95a1a54b086e1bd5 / test / test-46-multi-arch / main.js
734 bytesRaw
1 | |
2 | |
3 | 'use strict'; |
4 | |
5 | const assert = require('assert'); |
6 | const utils = require('../utils.js'); |
7 | |
8 | assert(!module.parent); |
9 | assert(__dirname === process.cwd()); |
10 | |
11 | // only linux-x64 has linux-armv7 counterpart |
12 | if (process.platform !== 'linux') return; |
13 | |
14 | const opposite = { x64: 'armv7', |
15 | x86: 'armv7', ia32: 'armv7', arm: 'x64' }; |
16 | |
17 | const target = opposite[process.arch]; |
18 | const input = './test-x-index.js'; |
19 | const output = './test-output.exe'; |
20 | |
21 | let right = utils.pkg.sync([ |
22 | '--target', target, |
23 | '--output', output, input |
24 | ], { stdio: 'pipe' }); |
25 | |
26 | assert(right.stdout.indexOf('\x1B\x5B') < 0, 'colors detected'); |
27 | assert(right.stdout.indexOf('Warning') >= 0); |
28 | assert(right.stdout.indexOf(target) >= 0); |
29 | utils.vacuum.sync(output); |
30 |
Built with git-ssb-web