<commit_before>xquery version "3.1";

import module namespace t = "http://exist-db.org/xquery/testing";

declare variable $doc external;
declare variable $id as xs:string? external;

(: hooks for sending external notifications about test events :)
declare variable $test-ignored-function as (function(xs:string) as empty-sequence())? external;
declare variable $test-started-function as (function(xs:string) as empty-sequence())? external;
declare variable $test-failure-function as (function(xs:string, map(xs:string, item()?), map(xs:string, item()?)?) as empty-sequence())? external;
declare variable $test-assumption-failed-function as (function(xs:string, map(xs:string, item()?)) as empty-sequence())? external;
declare variable $test-error-function as (function(xs:string, map(xs:string, item()?)?) as empty-sequence())? external;
declare variable $test-finished-function as (function(xs:string) as empty-sequence())? external;

let $testSet :=
    if ($doc instance of xs:string) then
    	doc(concat("/db/test/", $doc))/TestSet
    else
    	$doc/TestSet
return
    t:run-testSet($testSet, $id,
            $test-ignored-function, $test-started-function, $test-failure-function,
            $test-assumption-failed-function, $test-error-function, $test-finished-function)<commit_msg>[bugfix] Be explicit about module hint<commit_after>xquery version "3.1";

import module namespace t = "http://exist-db.org/xquery/testing"
    at "resource:org/exist/xquery/lib/test.xq";

declare variable $doc external;
declare variable $id as xs:string? external;

(: hooks for sending external notifications about test events :)
declare variable $test-ignored-function as (function(xs:string) as empty-sequence())? external;
declare variable $test-started-function as (function(xs:string) as empty-sequence())? external;
declare variable $test-failure-function as (function(xs:string, map(xs:string, item()?), map(xs:string, item()?)?) as empty-sequence())? external;
declare variable $test-assumption-failed-function as (function(xs:string, map(xs:string, item()?)) as empty-sequence())? external;
declare variable $test-error-function as (function(xs:string, map(xs:string, item()?)?) as empty-sequence())? external;
declare variable $test-finished-function as (function(xs:string) as empty-sequence())? external;

let $testSet :=
    if ($doc instance of xs:string) then
    	doc(concat("/db/test/", $doc))/TestSet
    else
    	$doc/TestSet
return
    t:run-testSet($testSet, $id,
            $test-ignored-function, $test-started-function, $test-failure-function,
            $test-assumption-failed-function, $test-error-function, $test-finished-function)
{'fraction_non_alphanumeric': 0.14984939759036145, 'fraction_numerical': 0.0015060240963855422, 'mean_word_length': 5.341288782816229, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5656044', 'n_tokens_mistral': 819, 'n_tokens_neox': 784, 'n_words': 212}