!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 12.93 GB of 57.97 GB (22.31%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

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

// Exploratory test to ascertain proper output when no t.comment() call
// is made.
tap.test('no comment', function (assert) {
	assert.plan(1);

	var verify = function (output) {
		assert.deepEqual(output.toString('utf8').split('\n'), [
			'TAP version 13',
			'# no comment',
			'',
			'1..0',
			'# tests 0',
			'# pass  0',
			'',
			'# ok',
			''
		]);
	};

	var test = tape.createHarness();
	test.createStream().pipe(concat(verify));
	test('no comment', function (t) {
		t.end();
	});
});

// Exploratory test, can we call t.comment() passing nothing?
tap.test('missing argument', function (assert) {
	assert.plan(1);
	var test = tape.createHarness();
	test.createStream();
	test('missing argument', function (t) {
		try {
			t.comment();
			t.end();
		} catch (err) {
			assert.equal(err.constructor, TypeError);
		} finally {
			assert.end();
		}
	});
});

// Exploratory test, can we call t.comment() passing nothing?
tap.test('null argument', function (assert) {
	assert.plan(1);
	var test = tape.createHarness();
	test.createStream();
	test('null argument', function (t) {
		try {
			t.comment(null);
			t.end();
		} catch (err) {
			assert.equal(err.constructor, TypeError);
		} finally {
			assert.end();
		}
	});
});

// Exploratory test, how is whitespace treated?
tap.test('whitespace', function (assert) {
	assert.plan(1);

	var verify = function (output) {
		assert.equal(output.toString('utf8'), [
			'TAP version 13',
			'# whitespace',
			'# ',
			'# a',
			'# a',
			'# a',
			'',
			'1..0',
			'# tests 0',
			'# pass  0',
			'',
			'# ok',
			''
		].join('\n'));
	};

	var test = tape.createHarness();
	test.createStream().pipe(concat(verify));
	test('whitespace', function (t) {
		t.comment(' ');
		t.comment(' a');
		t.comment('a ');
		t.comment(' a ');
		t.end();
	});
});

// Exploratory test, how about passing types other than strings?
tap.test('non-string types', function (assert) {
	assert.plan(1);

	var verify = function (output) {
		assert.equal(output.toString('utf8'), [
			'TAP version 13',
			'# non-string types',
			'# true',
			'# false',
			'# 42',
			'# 6.66',
			'# [object Object]',
			'# [object Object]',
			'# [object Object]',
			'# function ConstructorFunction() {}',
			'',
			'1..0',
			'# tests 0',
			'# pass  0',
			'',
			'# ok',
			''
		].join('\n'));
	};

	var test = tape.createHarness();
	test.createStream().pipe(concat(verify));
	test('non-string types', function (t) {
		t.comment(true);
		t.comment(false);
		t.comment(42);
		t.comment(6.66);
		t.comment({});
		t.comment({ answer: 42 });
		function ConstructorFunction() {}
		t.comment(new ConstructorFunction());
		t.comment(ConstructorFunction);
		t.end();
	});
});

tap.test('multiline string', function (assert) {
	assert.plan(1);

	var verify = function (output) {
		assert.equal(output.toString('utf8'), [
			'TAP version 13',
			'# multiline strings',
			'# a',
			'# b',
			'# c',
			'# d',
			'',
			'1..0',
			'# tests 0',
			'# pass  0',
			'',
			'# ok',
			''
		].join('\n'));
	};

	var test = tape.createHarness();
	test.createStream().pipe(concat(verify));
	test('multiline strings', function (t) {
		t.comment([
			'a',
			'b'
		].join('\n'));
		t.comment([
			'c',
			'd'
		].join('\r\n'));
		t.end();
	});
});

tap.test('comment with createStream/objectMode', function (assert) {
	assert.plan(1);

	var test = tape.createHarness();
	test.createStream({ objectMode: true }).on('data', function (row) {
		if (typeof row === 'string') {
			assert.equal(row, 'comment message');
		}
	});
	test('t.comment', function (t) {
		t.comment('comment message');
		t.end();
	});
});

:: 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.0128 ]--