git ssb

0+

cel-desktop / ssb-pkg



Tree: cfc8d49135488f7554210234b3a503c2dbd6c6a5

Files: cfc8d49135488f7554210234b3a503c2dbd6c6a5 / test / test-46-multi-arch / main.js

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

Built with git-ssb-web