This repository was archived by the owner on Jan 13, 2024. It is now read-only.
Commit 7ff6430 1 parent 061a977 commit 7ff6430 Copy full SHA for 7ff6430
File tree 2 files changed +47
-0
lines changed
2 files changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env node
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 input = './test-x-index.js' ;
14
+ const output = './run-time/test-output.exe' ;
15
+
16
+ let left ;
17
+ utils . mkdirp . sync ( path . dirname ( output ) ) ;
18
+
19
+ left = utils . spawn . sync (
20
+ 'node' , [ '--v8-options' ] ,
21
+ { cwd : path . dirname ( input ) }
22
+ ) ;
23
+
24
+ for ( const option of [ 'v8-options' , 'v8_options' ] ) {
25
+ let right ;
26
+
27
+ utils . pkg . sync ( [
28
+ '--target' , target ,
29
+ '--options' , option ,
30
+ '--output' , output , input
31
+ ] ) ;
32
+
33
+ right = utils . spawn . sync (
34
+ './' + path . basename ( output ) , [ ] ,
35
+ { cwd : path . dirname ( output ) }
36
+ ) ;
37
+
38
+ assert ( left . indexOf ( '--expose_gc' ) >= 0 ||
39
+ left . indexOf ( '--expose-gc' ) >= 0 ) ;
40
+ assert ( right . indexOf ( '--expose_gc' ) >= 0 ||
41
+ right . indexOf ( '--expose-gc' ) >= 0 ) ;
42
+ }
43
+
44
+ utils . vacuum . sync ( path . dirname ( output ) ) ;
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ console . log ( 'should not be executed' ) ;
You can’t perform that action at this time.
0 commit comments