!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/local/share/.cache/yarn/v6/npm-tape-5.6.1-integrity/node_modules/tape/test/   drwxr-xr-x
Free 13.24 GB of 57.97 GB (22.84%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     deep-equal-failure.js (5.09 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
'use strict';

var tape = require('../');
var tap = require('tap');
var concat = require('concat-stream');
var tapParser = require('tap-parser');
var common = require('./common');

var getDiag = common.getDiag;
var stripFullStack = common.stripFullStack;

tap.test('deep equal failure', function (assert) {
	var test = tape.createHarness({ exit: false });
	var stream = test.createStream();
	var parser = tapParser();
	assert.plan(3);

	stream.pipe(parser);
	stream.pipe(concat(function (body) {
		assert.deepEqual(stripFullStack(body.toString('utf8')), [
			'TAP version 13',
			'# deep equal',
			'not ok 1 should be strictly equal',
			'  ---',
			'    operator: equal',
			'    expected: |-',
			'      { b: 2 }',
			'    actual: |-',
			'      { a: 1 }',
			'    at: Test.<anonymous> ($TEST/deep-equal-failure.js:$LINE:$COL)',
			'    stack: |-',
			'      Error: should be strictly equal',
			'          [... stack stripped ...]',
			'          at Test.<anonymous> ($TEST/deep-equal-failure.js:$LINE:$COL)',
			'          [... stack stripped ...]',
			'  ...',
			'',
			'1..1',
			'# tests 1',
			'# pass  0',
			'# fail  1',
			''
		]);

		assert.deepEqual(getDiag(body), {
			operator: 'equal',
			expected: '{ b: 2 }',
			actual: '{ a: 1 }'
		});
	}));

	parser.once('assert', function (data) {
		assert.deepEqual(data, {
			ok: false,
			id: 1,
			name: 'should be strictly equal',
			diag: {
				operator: 'equal',
				expected: '{ b: 2 }',
				actual: '{ a: 1 }',
				// we don't care about these next two
				stack: data.diag.stack,
				at: data.diag.at
			}
		});
	});

	test('deep equal', function (t) {
		t.plan(1);
		t.equal({ a: 1 }, { b: 2 });
	});
});

tap.test('deep equal failure, depth 6, with option', function (assert) {
	var test = tape.createHarness({ exit: false });
	var stream = test.createStream();
	var parser = tapParser();
	assert.plan(3);

	stream.pipe(parser);
	stream.pipe(concat(function (body) {
		assert.deepEqual(stripFullStack(body.toString('utf8')), [
			'TAP version 13',
			'# deep equal',
			'not ok 1 should be strictly equal',
			'  ---',
			'    operator: equal',
			'    expected: |-',
			'      { a: { a1: { a2: { a3: { a4: { a5: 2 } } } } } }',
			'    actual: |-',
			'      { a: { a1: { a2: { a3: { a4: { a5: 1 } } } } } }',
			'    at: Test.<anonymous> ($TEST/deep-equal-failure.js:$LINE:$COL)',
			'    stack: |-',
			'      Error: should be strictly equal',
			'          [... stack stripped ...]',
			'          at Test.<anonymous> ($TEST/deep-equal-failure.js:$LINE:$COL)',
			'          [... stack stripped ...]',
			'  ...',
			'',
			'1..1',
			'# tests 1',
			'# pass  0',
			'# fail  1',
			''
		]);

		assert.deepEqual(getDiag(body), {
			operator: 'equal',
			expected: '{ a: { a1: { a2: { a3: { a4: { a5: 2 } } } } } }',
			actual: '{ a: { a1: { a2: { a3: { a4: { a5: 1 } } } } } }'
		});
	}));

	parser.once('assert', function (data) {
		assert.deepEqual(data, {
			ok: false,
			id: 1,
			name: 'should be strictly equal',
			diag: {
				operator: 'equal',
				expected: '{ a: { a1: { a2: { a3: { a4: { a5: 2 } } } } } }',
				actual: '{ a: { a1: { a2: { a3: { a4: { a5: 1 } } } } } }',
				// we don't care about these next two
				stack: data.diag.stack,
				at: data.diag.at
			}
		});
	});

	test('deep equal', { objectPrintDepth: 6 }, function (t) {
		t.plan(1);
		t.equal({ a: { a1: { a2: { a3: { a4: { a5: 1 } } } } } }, { a: { a1: { a2: { a3: { a4: { a5: 2 } } } } } });
	});
});

tap.test('deep equal failure, depth 6, without option', function (assert) {
	var test = tape.createHarness({ exit: false });
	var stream = test.createStream();
	var parser = tapParser();
	assert.plan(3);

	stream.pipe(parser);
	stream.pipe(concat(function (body) {
		assert.deepEqual(stripFullStack(body.toString('utf8')), [
			'TAP version 13',
			'# deep equal',
			'not ok 1 should be strictly equal',
			'  ---',
			'    operator: equal',
			'    expected: |-',
			'      { a: { a1: { a2: { a3: { a4: [Object] } } } } }',
			'    actual: |-',
			'      { a: { a1: { a2: { a3: { a4: [Object] } } } } }',
			'    at: Test.<anonymous> ($TEST/deep-equal-failure.js:$LINE:$COL)',
			'    stack: |-',
			'      Error: should be strictly equal',
			'          [... stack stripped ...]',
			'          at Test.<anonymous> ($TEST/deep-equal-failure.js:$LINE:$COL)',
			'          [... stack stripped ...]',
			'  ...',
			'',
			'1..1',
			'# tests 1',
			'# pass  0',
			'# fail  1',
			''
		]);

		assert.deepEqual(getDiag(body), {
			operator: 'equal',
			expected: '{ a: { a1: { a2: { a3: { a4: [Object] } } } } }',
			actual: '{ a: { a1: { a2: { a3: { a4: [Object] } } } } }'
		});
	}));

	parser.once('assert', function (data) {
		assert.deepEqual(data, {
			ok: false,
			id: 1,
			name: 'should be strictly equal',
			diag: {
				operator: 'equal',
				expected: '{ a: { a1: { a2: { a3: { a4: [Object] } } } } }',
				actual: '{ a: { a1: { a2: { a3: { a4: [Object] } } } } }',
				// we don't care about these next two
				stack: data.diag.stack,
				at: data.diag.at
			}
		});
	});

	test('deep equal', function (t) {
		t.plan(1);
		t.equal({ a: { a1: { a2: { a3: { a4: { a5: 1 } } } } } }, { a: { a1: { a2: { a3: { a4: { a5: 2 } } } } } });
	});
});

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0154 ]--