@@ -49,7 +49,7 @@ describe('StringArrayScopeCallsWrapperTransformer', function () {
49
49
50
50
describe ( 'Variant #2: option value is bigger then count `literal` nodes in the scope' , ( ) => {
51
51
const stringArrayCallRegExp : RegExp = new RegExp (
52
- 'return _0x([a-f0-9]){4,6};' +
52
+ 'return _0x([a-f0-9]){4,6};' +
53
53
'};' +
54
54
'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4};' +
55
55
'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4};' +
@@ -116,11 +116,11 @@ describe('StringArrayScopeCallsWrapperTransformer', function () {
116
116
describe ( 'Variant #1: option value is lower then count `literal` nodes in the scope' , ( ) => {
117
117
const stringArrayCallRegExp : RegExp = new RegExp (
118
118
'function test *\\( *\\) *{' +
119
- 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4};' +
120
- 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4};' +
121
- 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4,6}\\(\'0x3\'\\);' +
122
- 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4,6}\\(\'0x4\'\\);' +
123
- 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4,6}\\(\'0x5\'\\);' +
119
+ 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4};' +
120
+ 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4};' +
121
+ 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4,6}\\(\'0x3\'\\);' +
122
+ 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4,6}\\(\'0x4\'\\);' +
123
+ 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4,6}\\(\'0x5\'\\);' +
124
124
'}'
125
125
) ;
126
126
@@ -148,12 +148,12 @@ describe('StringArrayScopeCallsWrapperTransformer', function () {
148
148
describe ( 'Variant #2: option value is bigger then count `literal` nodes in the scope' , ( ) => {
149
149
const stringArrayCallRegExp : RegExp = new RegExp (
150
150
'function test *\\(\\) *{' +
151
- 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4};' +
152
- 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4};' +
153
- 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4};' +
154
- 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4,6}\\(\'0x3\'\\);' +
155
- 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4,6}\\(\'0x4\'\\);' +
156
- 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4,6}\\(\'0x5\'\\);' +
151
+ 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4};' +
152
+ 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4};' +
153
+ 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4};' +
154
+ 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4,6}\\(\'0x3\'\\);' +
155
+ 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4,6}\\(\'0x4\'\\);' +
156
+ 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4,6}\\(\'0x5\'\\);' +
157
157
'}'
158
158
) ;
159
159
@@ -181,11 +181,11 @@ describe('StringArrayScopeCallsWrapperTransformer', function () {
181
181
describe ( 'Variant #3: correct wrappers order' , ( ) => {
182
182
const stringArrayCallRegExp : RegExp = new RegExp (
183
183
'function test *\\( *\\) *{' +
184
- 'const h *= *b;' +
185
- 'const i *= *b;' +
186
- 'const c *= *[h|i]\\(\'0x3\'\\);' +
187
- 'const d *= *[h|i]\\(\'0x4\'\\);' +
188
- 'const e *= *[h|i]\\(\'0x5\'\\);' +
184
+ 'const h *= *b;' +
185
+ 'const i *= *b;' +
186
+ 'const c *= *[h|i]\\(\'0x3\'\\);' +
187
+ 'const d *= *[h|i]\\(\'0x4\'\\);' +
188
+ 'const e *= *[h|i]\\(\'0x5\'\\);' +
189
189
'}'
190
190
) ;
191
191
@@ -249,7 +249,7 @@ describe('StringArrayScopeCallsWrapperTransformer', function () {
249
249
const stringArrayCallRegExp : RegExp = new RegExp (
250
250
'var c *= *b;' +
251
251
'if *\\(!!\\[]\\) *{' +
252
- 'var foo *= *c\\(\'0x0\'\\);' +
252
+ 'var foo *= *c\\(\'0x0\'\\);' +
253
253
'}'
254
254
) ;
255
255
@@ -306,7 +306,7 @@ describe('StringArrayScopeCallsWrapperTransformer', function () {
306
306
307
307
describe ( 'Variant #4: prevailing kind of variables' , ( ) => {
308
308
const stringArrayCallRegExp : RegExp = new RegExp (
309
- 'return _0x([a-f0-9]){4,6};' +
309
+ 'return _0x([a-f0-9]){4,6};' +
310
310
'};' +
311
311
'var _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4};' +
312
312
'var _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4};' +
@@ -368,22 +368,22 @@ describe('StringArrayScopeCallsWrapperTransformer', function () {
368
368
'const q *= *b;' +
369
369
'const foo *= *q\\(\'0x0\'\\);' +
370
370
'function test\\(c, *d\\) *{' +
371
- 'const r *= *q;' +
372
- 'const e *= *r\\(\'0x1\'\\);' +
373
- 'const f *= *r\\(\'0x2\'\\);' +
374
- 'function g\\(h, *i\\) *{' +
375
- 'const s *= *r;' +
376
- 'const j *= *s\\(\'0x3\'\\);' +
377
- 'const k *= *s\\(\'0x4\'\\);' +
378
- 'function l\\(m, *n *\\) *{' +
379
- 'const t *= *s;' +
380
- 'const o *= *t\\(\'0x3\'\\);' +
381
- 'const p *= *t\\(\'0x4\'\\);' +
382
- 'return o *\\+ *p;' +
383
- '}' +
384
- 'return j *\\+ *k;' +
385
- '}' +
386
- 'return e *\\+ *f *\\+ *g\\(\\);' +
371
+ 'const r *= *q;' +
372
+ 'const e *= *r\\(\'0x1\'\\);' +
373
+ 'const f *= *r\\(\'0x2\'\\);' +
374
+ 'function g\\(h, *i\\) *{' +
375
+ 'const s *= *r;' +
376
+ 'const j *= *s\\(\'0x3\'\\);' +
377
+ 'const k *= *s\\(\'0x4\'\\);' +
378
+ 'function l\\(m, *n *\\) *{' +
379
+ 'const t *= *s;' +
380
+ 'const o *= *t\\(\'0x3\'\\);' +
381
+ 'const p *= *t\\(\'0x4\'\\);' +
382
+ 'return o *\\+ *p;' +
383
+ '}' +
384
+ 'return j *\\+ *k;' +
385
+ '}' +
386
+ 'return e *\\+ *f *\\+ *g\\(\\);' +
387
387
'}'
388
388
) ;
389
389
@@ -869,7 +869,7 @@ describe('StringArrayScopeCallsWrapperTransformer', function () {
869
869
describe ( 'Variant #1: root scope' , ( ) => {
870
870
describe ( 'Variant #1: `1` scope calls wrapper for each encoding type' , ( ) => {
871
871
const stringArrayWrappersRegExp : RegExp = new RegExp (
872
- 'return _0x([a-f0-9]){4,6};' +
872
+ 'return _0x([a-f0-9]){4,6};' +
873
873
'};' +
874
874
'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4};' +
875
875
// this one may be added or not depends on:
@@ -907,7 +907,7 @@ describe('StringArrayScopeCallsWrapperTransformer', function () {
907
907
908
908
describe ( 'Variant #2: `2` scope calls wrappers for each encoding type' , ( ) => {
909
909
const stringArrayWrappersRegExp : RegExp = new RegExp (
910
- 'return _0x([a-f0-9]){4,6};' +
910
+ 'return _0x([a-f0-9]){4,6};' +
911
911
'};' +
912
912
'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4};' +
913
913
'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4};' +
@@ -949,13 +949,13 @@ describe('StringArrayScopeCallsWrapperTransformer', function () {
949
949
describe ( 'Variant #1: `1` scope calls wrapper for each encoding type' , ( ) => {
950
950
const stringArrayWrappersRegExp : RegExp = new RegExp (
951
951
'function test *\\( *\\) *{' +
952
- 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4};' +
953
- // this one may be added or not depends on:
954
- // if all literal values encoded with a single encoding or not
955
- '(?:const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4};)?' +
956
- 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4,6}\\(\'0x3\'\\);' +
957
- 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4,6}\\(\'0x4\'\\);' +
958
- 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4,6}\\(\'0x5\'\\);' +
952
+ 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4};' +
953
+ // this one may be added or not depends on:
954
+ // if all literal values encoded with a single encoding or not
955
+ '(?:const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4};)?' +
956
+ 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4,6}\\(\'0x3\'\\);' +
957
+ 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4,6}\\(\'0x4\'\\);' +
958
+ 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4,6}\\(\'0x5\'\\);' +
959
959
'}'
960
960
) ;
961
961
@@ -987,14 +987,14 @@ describe('StringArrayScopeCallsWrapperTransformer', function () {
987
987
describe ( 'Variant #2: `2` scope calls wrappers for each encoding type' , ( ) => {
988
988
const stringArrayWrappersRegExp : RegExp = new RegExp (
989
989
'function test *\\( *\\) *{' +
990
- 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4};' +
991
- 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4};' +
992
- // this one may be added or not depends on:
993
- // if all literal values encoded with a single encoding or not
994
- '(?:const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4};)?' +
995
- 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4,6}\\(\'0x3\'\\);' +
996
- 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4,6}\\(\'0x4\'\\);' +
997
- 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4,6}\\(\'0x5\'\\);' +
990
+ 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4};' +
991
+ 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4};' +
992
+ // this one may be added or not depends on:
993
+ // if all literal values encoded with a single encoding or not
994
+ '(?:const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4};)?' +
995
+ 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4,6}\\(\'0x3\'\\);' +
996
+ 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4,6}\\(\'0x4\'\\);' +
997
+ 'const _0x([a-f0-9]){4,6} *= *_0x([a-f0-9]){4,6}\\(\'0x5\'\\);' +
998
998
'}'
999
999
) ;
1000
1000
0 commit comments