Файловый менеджер - Редактировать - /home/freeclou/app.optimyar.com/front-web/build/assets/fonts/iran-yekan/beflpn/test.zip
Назад
PK ��i[zs�- - tst.basic.jsnu �Iw�� /* * tst.basic.js: tests various valid invocation */ var mod_assert = require('assert'); var mod_extsprintf = require('../lib/extsprintf'); var mod_path = require('path'); var sprintf = mod_extsprintf.sprintf; var testcases = [ { 'name': 'empty string', 'args': [ '' ], 'result': '' }, { 'name': '%s: basic', 'args': [ '%s', 'foo' ], 'result': 'foo' }, { 'name': '%s: not first', 'args': [ 'hello %s\n', 'world' ], 'result': 'hello world\n' }, { 'name': '%s: right-aligned', 'args': [ 'hello %10s\n', 'world' ], 'result': 'hello world\n' }, { 'name': '%s: left-aligned', 'args': [ 'hello %-10sagain\n', 'world' ], 'result': 'hello world again\n' }, { 'name': '%d: basic, positive', 'args': [ '%d', 17 ], 'result': '17' }, { 'name': '%d: basic, zero', 'args': [ '%d', 0 ], 'result': '0' }, { 'name': '%d: basic, floating point value', 'args': [ '%d', 17.3 ], 'result': '17' }, { 'name': '%d: basic, negative', 'args': [ '%d', -3 ], 'result': '-3' }, { 'name': '%d: right-aligned', 'args': [ '%4d', 17 ], 'result': ' 17' }, { 'name': '%d: right-aligned, zero-padded', 'args': [ '%04d', 17 ], 'result': '0017' }, { 'name': '%d: left-aligned', 'args': [ '%-4d', 17 ], 'result': '17 ' }, { 'name': '%x: basic', 'args': [ '%x', 18], 'result': '12' }, { 'name': '%x: zero-padded, right-aligned', 'args': [ '%08x', 0xfeedface ], 'result': 'feedface' }, { 'name': '%d: with plus sign', 'args': [ '%+d', 17 ], 'result': '+17' }, { 'name': '%f: basic', 'args': [ '%f', 3.2 ], 'result': '3.2' }, { 'name': '%f: right-aligned', 'args': [ '%5f', 3.2 ], 'result': ' 3.2' }, { 'name': '%%: basic', 'args': [ '%%' ], 'result': '%' }, { 'name': 'complex', 'args': [ 'one %s %8s %-3d bytes past 0x%04x, which was %6f%%%s%5s', 'program', 'wrote', -2, 0x30, 3.7, ' plus', 'over' ], 'result': 'one program wrote -2 bytes past 0x0030, which was ' + '3.7% plus over' } ]; function main(verbose) { /* * Create one test case with a very large input string. */ var input = '1234'; while (input.length < 100 * 1024) { input += input; } testcases.push({ 'name': 'long string argument (' + input.length + ' characters)', 'args': [ '%s', input ], 'result': input }); testcases.forEach(function (tc) { var result; console.error('test case: %s', tc.name); result = sprintf.apply(null, tc.args); if (verbose) { console.error(' args: %s', JSON.stringify(tc.args)); console.error(' result: %s', result); } mod_assert.equal(tc.result, result); }); console.log('%s tests passed', mod_path.basename(__filename)); } main(process.argv.length > 2 && process.argv[2] == '-v'); PK ��i[3�� � tst.invalid.jsnu �Iw�� /* * tst.invalid.js: tests invalid invocations */ var mod_assert = require('assert'); var mod_extsprintf = require('../lib/extsprintf'); var mod_path = require('path'); var sprintf = mod_extsprintf.sprintf; var testcases = [ { 'name': 'missing all arguments', 'args': [], 'errmsg': /first argument must be a format string$/ }, { 'name': 'missing argument for format specifier (first char and specifier)', 'args': [ '%s' ], 'errmsg': new RegExp( 'format string "%s": conversion specifier "%s" at character 1 ' + 'has no matching argument \\(too few arguments passed\\)') }, { 'name': 'missing argument for format specifier (later in string)', 'args': [ 'hello %s world %13d', 'big' ], 'errmsg': new RegExp( 'format string "hello %s world %13d": conversion specifier "%13d" at ' + 'character 16 has no matching argument \\(too few arguments passed\\)') }, { 'name': 'printing null as string', 'args': [ '%d cookies %3s', 15, null ], 'errmsg': new RegExp( 'format string "%d cookies %3s": conversion specifier "%3s" at ' + 'character 12 attempted to print undefined or null as a string ' + '\\(argument 3 to sprintf\\)') }, { 'name': 'printing undefined as string', 'args': [ '%d cookies %3s ah %d', 15, undefined, 7 ], 'errmsg': new RegExp( 'format string "%d cookies %3s ah %d": conversion specifier "%3s" at ' + 'character 12 attempted to print undefined or null as a string ' + '\\(argument 3 to sprintf\\)') }, { 'name': 'unsupported format character', 'args': [ 'do not use %X', 13 ], 'errmsg': new RegExp( 'format string "do not use %X": conversion ' + 'specifier "%X" at character 12 is not supported$') }, { 'name': 'unsupported flags', 'args': [ '%#x', 13 ], 'errmsg': new RegExp( 'format string "%#x": conversion ' + 'specifier "%#x" at character 1 uses unsupported flags$') } ]; function main(verbose) { testcases.forEach(function (tc) { var error; console.error('test case: %s', tc.name); if (verbose) { console.error(' args: %s', JSON.stringify(tc.args)); } mod_assert.throws(function () { try { sprintf.apply(null, tc.args); } catch (ex) { error = ex; throw (ex); } }, tc.errmsg); if (verbose && error) { console.error(' error: %s', error.message); } }); console.log('%s tests passed', mod_path.basename(__filename)); } main(process.argv.length > 2 && process.argv[2] == '-v'); PK ��j[�4=� � index.jsnu �Iw�� 'use strict'; var values = require('../'); var test = require('tape'); var runTests = require('./tests'); test('as a function', function (t) { t.test('bad array/this value', function (st) { st['throws'](function () { values(undefined); }, TypeError, 'undefined is not an object'); st['throws'](function () { values(null); }, TypeError, 'null is not an object'); st.end(); }); runTests(values, t); t.end(); }); PK �Ym[m� G� � .eslintrcnu �Iw�� { "rules": { "array-bracket-newline": 0, "max-lines-per-function": 0, "max-nested-callbacks": [2, 3], "max-statements": [2, 12], "max-statements-per-line": [2, { "max": 2 }], "no-invalid-this": [1], "object-curly-newline": 0, } } PK �Ym[X�Fm� � implementation.jsnu �Iw�� 'use strict'; var implementation = require('../implementation'); var callBind = require('call-bind'); var test = require('tape'); var hasStrictMode = require('has-strict-mode')(); var runTests = require('./tests'); test('as a function', function (t) { t.test('bad array/this value', { skip: !hasStrictMode }, function (st) { /* eslint no-useless-call: 0 */ st['throws'](function () { implementation.call(undefined); }, TypeError, 'undefined is not an object'); st['throws'](function () { implementation.call(null); }, TypeError, 'null is not an object'); st.end(); }); runTests(callBind(implementation, Object), t); t.end(); }); PK �Ym[־͠� � shimmed.jsnu �Iw�� 'use strict'; require('../auto'); var test = require('tape'); var defineProperties = require('define-properties'); var isEnumerable = Object.prototype.propertyIsEnumerable; var functionsHaveNames = require('functions-have-names')(); var runTests = require('./tests'); test('shimmed', function (t) { t.equal(Object.values.length, 1, 'Object.values has a length of 1'); t.test('Function name', { skip: !functionsHaveNames }, function (st) { st.equal(Object.values.name, 'values', 'Object.values has name "values"'); st.end(); }); t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) { et.equal(false, isEnumerable.call(Object, 'values'), 'Object.values is not enumerable'); et.end(); }); var supportsStrictMode = (function () { return typeof this === 'undefined'; }()); t.test('bad object value', { skip: !supportsStrictMode }, function (st) { st['throws'](function () { return Object.values(undefined); }, TypeError, 'undefined is not an object'); st['throws'](function () { return Object.values(null); }, TypeError, 'null is not an object'); st.end(); }); runTests(Object.values, t); t.end(); }); PK �Ym[<;�K K tests.jsnu �Iw�� 'use strict'; var keys = require('object-keys'); var map = require('array.prototype.map'); var define = require('define-properties'); var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; module.exports = function (values, t) { var a = {}; var b = {}; var c = {}; var obj = { a: a, b: b, c: c }; t.deepEqual(values(obj), [a, b, c], 'basic support'); t.deepEqual(values({ a: a, b: a, c: c }), [a, a, c], 'duplicate values are included'); t.test('values are in the same order as keys', function (st) { var object = { a: a, b: b }; object[0] = 3; object.c = c; object[1] = 4; delete object[0]; var objKeys = keys(object); var objValues = map(objKeys, function (key) { return object[key]; }); st.deepEqual(values(object), objValues, 'values match key order'); st.end(); }); t.test('non-enumerable properties are omitted', { skip: !Object.defineProperty }, function (st) { var object = { a: a, b: b }; Object.defineProperty(object, 'c', { enumerable: false, value: c }); st.deepEqual(values(object), [a, b], 'non-enumerable property‘s value is omitted'); st.end(); }); t.test('inherited properties are omitted', function (st) { var F = function G() {}; F.prototype.a = a; var f = new F(); f.b = b; st.deepEqual(values(f), [b], 'only own properties are included'); st.end(); }); t.test('Symbol properties are omitted', { skip: !hasSymbols }, function (st) { var object = { a: a, b: b, c: c }; var enumSym = Symbol('enum'); var nonEnumSym = Symbol('non enum'); object[enumSym] = enumSym; object.d = enumSym; Object.defineProperty(object, nonEnumSym, { enumerable: false, value: nonEnumSym }); st.deepEqual(values(object), [a, b, c, enumSym], 'symbol properties are omitted'); st.end(); }); t.test('not-yet-visited keys deleted on [[Get]] must not show up in output', { skip: !define.supportsDescriptors }, function (st) { var o = { a: 1, b: 2, c: 3 }; Object.defineProperty(o, 'a', { get: function () { delete this.b; return 1; } }); st.deepEqual(values(o), [1, 3], 'when "b" is deleted prior to being visited, it should not show up'); st.end(); }); t.test('not-yet-visited keys made non-enumerable on [[Get]] must not show up in output', { skip: !define.supportsDescriptors }, function (st) { var o = { a: 'A', b: 'B' }; Object.defineProperty(o, 'a', { get: function () { Object.defineProperty(o, 'b', { enumerable: false }); return 'A'; } }); st.deepEqual(values(o), ['A'], 'when "b" is made non-enumerable prior to being visited, it should not show up'); st.end(); }); }; PK ��i[zs�- - tst.basic.jsnu �Iw�� PK ��i[3�� � i tst.invalid.jsnu �Iw�� PK ��j[�4=� � d index.jsnu �Iw�� PK �Ym[m� G� � D .eslintrcnu �Iw�� PK �Ym[X�Fm� � s implementation.jsnu �Iw�� PK �Ym[־͠� � 9 shimmed.jsnu �Iw�� PK �Ym[<;�K K � tests.jsnu �Iw�� PK �*
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка