T.ME/BIBIL_0DAY
CasperSecurity


Server : Apache/2
System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
User : gositeme ( 1004)
PHP Version : 8.2.29
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Directory :  /home/gositeme/domains/lavocat.quebec/private_html/node_modules/lop/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/gositeme/domains/lavocat.quebec/private_html/node_modules/lop/test/Tokeniser.test.js
var Tokeniser = require("./Tokeniser");
var Token = require("../lib/Token");
var StringSource = require("../lib/StringSource");

exports.stringIsSingleIdentifier = stringIsTokenisedTo("blah", [
    new Token("identifier", "blah", stringSourceRange("blah", 0, 4)),
    new Token("end", null, stringSourceRange("blah", 4, 4))
]);

exports.identifiersAreSeparatedByWhitespace = stringIsTokenisedTo("one two", [
    new Token("identifier", "one", stringSourceRange("one two", 0, 3)),
    new Token("identifier", "two", stringSourceRange("one two", 4, 7)),
    new Token("end", null, stringSourceRange("one two", 7, 7))
]);

exports.canDetectKeywords = stringIsTokenisedTo("true", [
    new Token("keyword", "true", stringSourceRange("true", 0, 4)),
    new Token("end", null, stringSourceRange("true", 4, 4))
]);

exports.emptyStringIsTokenisedToSingleEndToken = stringIsTokenisedTo("", [
    new Token("end", null, stringSourceRange("", 0, 0))
]);

function stringIsTokenisedTo(input, expected) {
    return function(test) {
        test.deepEqual(expected, tokenise(input));
        test.done();
    };
};

function stringSourceRange(string, startIndex, endIndex) {
    return new StringSource(string).range(startIndex, endIndex);
};

function tokenise(input) {
    return new Tokeniser({keywords: ["true"]}).tokenise(input);
};

CasperSecurity Mini