<commit_before><?php
$rootPath = exec('pwd');
include_once __DIR__.'/src/Core.php';

include_once __DIR__.'/src/class/Tests.php';
$core = new Core($rootPath);

// Check test exist
if(true) {
    system('clear');
    list($script,$params) = explode('?',str_replace('..','',$argv[1]),2);
    $script = explode('/',$script);
    $path = ($script[0][0]=='_')?__DIR__:$core->system->app_path;

    echo "CloudFramwork Test Script v1.0\napp_path: {$path}\n------------------------------\n\n";
    if(!strlen($script[0])) die ('Mising Test name: Use php vendor/cloudframework-io/appengine-php-core/runtest.php {test_name}'."\n\n");

    // $script[0] = string

    if(!is_file($path.'/tests/'.$script[0].'.php')) die('Test not found: '.$path.'/tests/'.$script[0]."\n\n");
    include_once $path.'/tests/'.$script[0].'.php';
    if(!class_exists('Test')) die($path.'/tests/'.$script[0].' does not include a "Class Test'."\n\n");
    /** @var Tests $test */
    $test = new Test($core);
    $test->params = $script;
    if(strlen($params))
        parse_str($params,$test->formParams);
    if(!method_exists($test,'main')) die('The class Test does not include the method "main()'."\n\n");
}

$test->main();
//system("clear");
//echo $test->send(true,true,$argv);
echo "\n\n";<commit_msg>improving run testing<commit_after><?php
$rootPath = exec('pwd');
include_once __DIR__.'/src/Core.php';

include_once __DIR__.'/src/class/Tests.php';
$core = new Core($rootPath);

// Check test exist
if(true) {
    system('clear');
    list($script,$params) = explode('?',str_replace('..','',$argv[1]),2);
    $script = explode('/',$script);
    $path = ($script[0][0]=='_')?__DIR__:$core->system->app_path;

    echo "CloudFramwork Test Script v1.0\napp_path: {$path}\n------------------------------\n\n";
    if(!strlen($script[0])) die ('Mising Test name: Use php vendor/cloudframework-io/appengine-php-core/runtest.php {test_name}'."\n\n");

    // $script[0] = string

    if(!is_file($path.'/tests/'.$script[0].'.php')) die('Test not found: '.$path.'/tests/'.$script[0]."\n\n Create it with:\n-------\n<?php\nclass Test extends Tests {\n\tfunction main() { }\n}\n-------\n\n");

    include_once $path.'/tests/'.$script[0].'.php';
    if(!class_exists('Test')) die($path.'/tests/'.$script[0].' does not include a "Class Test'."\n\n");

    /** @var Tests $test */
    $test = new Test($core);
    $test->params = $script;
    if(strlen($params))
        parse_str($params,$test->formParams);
    if(!method_exists($test,'main')) die('The class Test does not include the method "main()'."\n\n");
}

$test->main();
//system("clear");
//echo $test->send(true,true,$argv);
echo "\n\n";
{'fraction_non_alphanumeric': 0.2716697936210131, 'fraction_numerical': 0.00900562851782364, 'mean_word_length': 3.5807560137457046, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5057822', 'n_tokens_mistral': 954, 'n_tokens_neox': 950, 'n_words': 168}