<commit_before>*** Settings ***
Force Tags      regression  pybot  jybot
Resource        ../../resources/resource.html

*** Variables ***
${BASE}  ${CURDIR}/../../testdata/misc
${LOGNAME}  suite_source_log.html

*** Test Cases ***
Link For File Suite
    [Setup]  Run Tests  --log ${LOGNAME}  misc${/}pass_and_fail.html
    Verify Suite Source Link  pass_and_fail.html

Links For Directory Suites
    [Setup]  Run Tests  --log ${LOGNAME}  misc${/}suites
    Verify Suite Source Link  suites
    Verify Suite Source Link  suites/subsuites

Using Rebot Preserves Link
    [Setup]  Run Rebot  --log ${LOGNAME}  ${OUTFILE}
    Verify Suite Source Link  suites
    Verify Suite Source Link  suites/subsuites

Link Is Not Created For Combined Suite
    [Setup]  Run Tests  --log ${LOGNAME}  misc${/}pass_and_fail.html  misc${/}pass_and_fail.html
    ${logfile} =  Verify Suite Source Link  pass_and_fail.html
    Should Be Equal As Numbers  ${logfile.count('Source:')}  2

*** Keywords ***
Verify Suite Source Link
    [Arguments]  ${path}
    ${path} =  Join Path  ${BASE}  ${path}
    ${logfile} =  Get File  ${OUTDIR}/${LOGNAME}
    Should Contain  ${logfile}  <a href="file://${path}">${path}</a>
    [Return]  ${logfile}
<commit_msg>Fixed tests to check relative paths in source hrefs.<commit_after>*** Settings ***
Force Tags      regression  pybot  jybot
Resource        ../../resources/resource.html

*** Variables ***
${RELATIVE}  ../../testdata/misc
${BASE}  ${CURDIR}${/}${RELATIVE}
${LOGNAME}  suite_source_log.html

*** Test Cases ***
Link For File Suite
    [Setup]  Run Tests  --log ${LOGNAME}  misc${/}pass_and_fail.html
    Verify Suite Source Link  pass_and_fail.html

Links For Directory Suites
    [Setup]  Run Tests  --log ${LOGNAME}  misc${/}suites
    Verify Suite Source Link  suites
    Verify Suite Source Link  suites/subsuites

Using Rebot Preserves Link
    [Setup]  Run Rebot  --log ${LOGNAME}  ${OUTFILE}
    Verify Suite Source Link  suites
    Verify Suite Source Link  suites/subsuites

Link Is Not Created For Combined Suite
    [Setup]  Run Tests  --log ${LOGNAME}  misc${/}pass_and_fail.html  misc${/}pass_and_fail.html
    ${logfile} =  Verify Suite Source Link  pass_and_fail.html
    Should Be Equal As Numbers  ${logfile.count('Source:')}  2

*** Keywords ***
Verify Suite Source Link
    [Arguments]  ${path}
    ${relpath}=  Set Variable  ../${RELATIVE}${/}${path}
    ${abspath}=  Join Path  ${BASE}      ${path}
    ${logfile}=  Get File  ${OUTDIR}/${LOGNAME}
    Should Contain  ${logfile}  <a href="${relpath}">${abspath}</a>
    [Return]  ${logfile}

{'fraction_non_alphanumeric': 0.1412037037037037, 'fraction_numerical': 0.0007716049382716049, 'mean_word_length': 3.2859504132231403, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6948671', 'n_tokens_mistral': 872, 'n_tokens_neox': 860, 'n_words': 256}