Skip to content

CAF::TextRender tests check for incorrect behaviour #281

@jrha

Description

@jrha

Specifically the following, which fail on EL10 as YAML::XS appears to have actually been fixed in the version shipped in EPEL10:

# but this goes wrong
$trd = CAF::TextRender->new('yaml',
{'yes' => $YAML_BOOL->{'yes'}, 'no' => $YAML_BOOL->{'no'}},
eol=>0);
$txt = "$trd";
$txt =~ s/\s//g;
is("$txt", "---no:''yes:1",
"yaml module renders booleans true/false incorrect when constructing hashref");

Failed test 'yaml module renders booleans true/false incorrect when constructing hashref'
at src/test/perl/textrender.t line 515.
       got: '---no:falseyes:true'
  expected: '---no:''yes:1'

# but this goes wrong
$trd = CAF::TextRender->new('yamlmulti', {
'a' => {'yes' => $YAML_BOOL->{'yes'}},
'b' => {'no' => $YAML_BOOL->{'no'}},
}, eol=>0);
$txt = "$trd";
$txt =~ s/\s//g;
is("$txt", "---yes:1---no:''",
"yamlmulti module renders booleans true/false incorrect when constructing hashref");

Failed test 'yamlmulti module renders booleans true/false incorrect when constructing hashref'
at src/test/perl/textrender.t line 581.
       got: '---yes:true---no:false'
  expected: '---yes:1---no:'''

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions