<commit_before>use v6;
BEGIN { @*INC.push: 'lib', '../lib' };

use SVG;
use Test;
plan *;
ok SVG.serialize('a' => [ :b<c>, '<foo>' ]) !~~ / '<foo>' /,
   'plain text is escaped (<>)';
ok SVG.serialize('a' => [ :b<c>, '&' ]) ~~ / '&amp;' /,
   'plain text is escaped (&)';
ok SVG.serialize('a' => [ :b<c>, 'a"b' ]) !~~ / 'a"b' /,
   'plain text is escaped (")';

done_testing;
<commit_msg>better diagnostics for failing test<commit_after>use v6;
BEGIN { @*INC.push: 'lib', '../lib' };

use SVG;
use Test;
plan *;
ok SVG.serialize('a' => [ :b<c>, '<foo>' ]) !~~ / '<foo>' /,
   'plain text is escaped (<>)';
given SVG.serialize('a' => [ :b<c>, '&' ]) {
    ok  $_ ~~ / '&amp;' /,
    'plain text is escaped (&)'
        or diag "XML: $_";
}
ok SVG.serialize('a' => [ :b<c>, 'a"b' ]) !~~ / 'a"b' /,
   'plain text is escaped (")';

done_testing;

{'fraction_non_alphanumeric': 0.2930011862396204, 'fraction_numerical': 0.002372479240806643, 'mean_word_length': 3.199004975124378, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 21, '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': '2072736', 'n_tokens_mistral': 373, 'n_tokens_neox': 364, 'n_words': 84}