!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)

/var/www/html/pmb/node_modules/grapheme-splitter/tests/   drwxr-xr-x
Free 13.03 GB of 57.97 GB (22.48%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     grapheme_splitter_tests.js (2.24 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
const fs = require('fs')
const test = require('tape')

const GraphemeSplitter = require('../index')

function ucs2encode(array) {
  return array.map( value => {
    let output = '';

    if (value > 0xFFFF) {
      value -= 0x10000;
      output += String.fromCharCode(value >>> 10 & 0x3FF | 0xD800);
      value = 0xDC00 | value & 0x3FF;
    }

    output += String.fromCharCode(value);
    return output;
  }).join('');
}

function testDataFromLine(line) {
  const codePoints = line.split(/\s*[×÷]\s*/).map(c => parseInt(c, 16));
  const input = ucs2encode(codePoints);

  const expected = line.split(/\s*÷\s*/) .map(sequence => {
    const codePoints = sequence.split(/\s*×\s*/).map(c => parseInt(c, 16))
    return ucs2encode(codePoints)
  });

  return { input, expected };
}

const testData = fs.readFileSync('tests/GraphemeBreakTest.txt', 'utf-8')
                   .split('\n')
                   .filter(line =>
                     line != null && line.length > 0 && !line.startsWith('#'))
                   .map(line => line.split('#')[0])
                   .map(testDataFromLine);

// ---------------------------------------------------------------------------
// Test cases
// ---------------------------------------------------------------------------
test('splitGraphemes returns properly split list from string', t => {
  const splitter = new GraphemeSplitter();

  t.plan(testData.length);

  testData.forEach( ({ input, expected }) => {
    const result = splitter.splitGraphemes(input);
    
    t.deepLooseEqual(result, expected);
  });

  t.end();
});

test('iterateGraphemes returns properly split iterator from string', t => {
  const splitter = new GraphemeSplitter();

  t.plan(testData.length);

  testData.forEach( ({ input, expected }) => {
    const result = splitter.iterateGraphemes(input);

    t.deepLooseEqual([...result], expected);
  });

  t.end();
});

test('countGraphemes returns the correct number of graphemes in string', t => {
  const splitter = new GraphemeSplitter();

  t.plan(testData.length);

  testData.forEach( ({ input, expected }) => {
    const result = splitter.countGraphemes(input);

    t.equal(result, expected.length);
  });

  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.0056 ]--