added whole system from ola4doc

This commit is contained in:
Bachir Soussi Chiadmi
2017-12-14 17:06:06 +01:00
parent 9646c74be1
commit 0611418f7a
8725 changed files with 817688 additions and 2 deletions
+12
View File
@@ -0,0 +1,12 @@
'use strict';
var indexTest = require('tad/lib/utils/index-test')
, path = require('path').resolve(__dirname, '../../../reg-exp/#');
module.exports = function (t, a, d) {
indexTest(indexTest.readDir(path).aside(function (data) {
delete data.sticky;
delete data.unicode;
}))(t, a, d);
};
+10
View File
@@ -0,0 +1,10 @@
'use strict';
module.exports = function (t, a) {
var re;
a(t.call(/raz/), false, "Normal");
a(t.call(/raz/g), false, "Global");
try { re = new RegExp('raz', 'y'); } catch (ignore) {}
if (!re) return;
a(t.call(re), true, "Sticky");
};
+10
View File
@@ -0,0 +1,10 @@
'use strict';
module.exports = function (t, a) {
var re;
a(t.call(/raz/), false, "Normal");
a(t.call(/raz/g), false, "Global");
try { re = new RegExp('raz', 'u'); } catch (ignore) {}
if (!re) return;
a(t.call(re), true, "Unicode");
};
+5
View File
@@ -0,0 +1,5 @@
'use strict';
var isImplemented = require('../../../../reg-exp/#/match/is-implemented');
module.exports = function (a) { a(isImplemented(), true); };
+3
View File
@@ -0,0 +1,3 @@
'use strict';
module.exports = require('./shim');
+3
View File
@@ -0,0 +1,3 @@
'use strict';
module.exports = function (t, a) { a(typeof t(), 'boolean'); };
+8
View File
@@ -0,0 +1,8 @@
'use strict';
module.exports = function (t, a) {
var result = ['foo'];
result.index = 0;
result.input = 'foobar';
a.deep(t.call(/foo/, 'foobar'), result);
};
+5
View File
@@ -0,0 +1,5 @@
'use strict';
var isImplemented = require('../../../../reg-exp/#/replace/is-implemented');
module.exports = function (a) { a(isImplemented(), true); };
+3
View File
@@ -0,0 +1,3 @@
'use strict';
module.exports = require('./shim');
+3
View File
@@ -0,0 +1,3 @@
'use strict';
module.exports = function (t, a) { a(typeof t(), 'boolean'); };
+5
View File
@@ -0,0 +1,5 @@
'use strict';
module.exports = function (t, a) {
a(t.call(/foo/, 'foobar', 'mar'), 'marbar');
};
+5
View File
@@ -0,0 +1,5 @@
'use strict';
var isImplemented = require('../../../../reg-exp/#/search/is-implemented');
module.exports = function (a) { a(isImplemented(), true); };
+3
View File
@@ -0,0 +1,3 @@
'use strict';
module.exports = require('./shim');
+3
View File
@@ -0,0 +1,3 @@
'use strict';
module.exports = function (t, a) { a(typeof t(), 'boolean'); };
+5
View File
@@ -0,0 +1,5 @@
'use strict';
module.exports = function (t, a) {
a(t.call(/foo/, 'barfoo'), 3);
};
+5
View File
@@ -0,0 +1,5 @@
'use strict';
var isImplemented = require('../../../../reg-exp/#/split/is-implemented');
module.exports = function (a) { a(isImplemented(), true); };
+3
View File
@@ -0,0 +1,3 @@
'use strict';
module.exports = require('./shim');
+3
View File
@@ -0,0 +1,3 @@
'use strict';
module.exports = function (t, a) { a(typeof t(), 'boolean'); };
+5
View File
@@ -0,0 +1,5 @@
'use strict';
module.exports = function (t, a) {
a.deep(t.call(/\|/, 'bar|foo'), ['bar', 'foo']);
};
+5
View File
@@ -0,0 +1,5 @@
'use strict';
var isImplemented = require('../../../../reg-exp/#/sticky/is-implemented');
module.exports = function (a) { a(isImplemented(), true); };
+3
View File
@@ -0,0 +1,3 @@
'use strict';
module.exports = function (t, a) { a(typeof t(), 'boolean'); };
+5
View File
@@ -0,0 +1,5 @@
'use strict';
var isImplemented = require('../../../../reg-exp/#/unicode/is-implemented');
module.exports = function (a) { a(isImplemented(), true); };
+3
View File
@@ -0,0 +1,3 @@
'use strict';
module.exports = function (t, a) { a(typeof t(), 'boolean'); };
+6
View File
@@ -0,0 +1,6 @@
'use strict';
module.exports = function (t, a) {
var str = "(?:^te|er)s{2}t\\[raz]+$";
a(RegExp('^' + t(str) + '$').test(str), true);
};
+12
View File
@@ -0,0 +1,12 @@
'use strict';
module.exports = function (t, a) {
a(t('arar'), false, "String");
a(t(12), false, "Number");
a(t(true), false, "Boolean");
a(t(new Date()), false, "Date");
a(t(new String('raz')), false, "String object");
a(t({}), false, "Plain object");
a(t(/a/), true, "Regular expression");
a(t(new RegExp('a')), true, "Regular expression via constructor");
};
+17
View File
@@ -0,0 +1,17 @@
'use strict';
module.exports = function (t, a) {
var r = /raz/;
a(t(r), r, "Direct");
r = new RegExp('foo');
a(t(r), r, "Constructor");
a.throws(function () {
t({});
}, "Object");
a.throws(function () {
t(function () {});
}, "Function");
a.throws(function () {
t({ exec: function () { return 20; } });
}, "Plain object");
};