Skip to content

Commit

Permalink
Also unit-test that loading booleans appear as proper core booleans
Browse files Browse the repository at this point in the history
  • Loading branch information
leonerd authored and perlpunk committed Jan 20, 2024
1 parent d95952c commit fbaa3b4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/boolean.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use FindBin '$Bin';
use lib $Bin;
use constant HAVE_BOOLEANS => ($^V ge v5.36);
use TestYAMLTests tests => 5 + (HAVE_BOOLEANS ? 1 : 0);
use TestYAMLTests tests => 5 + (HAVE_BOOLEANS ? 2 : 0);

my $yaml = <<'...';
---
Expand Down Expand Up @@ -51,4 +51,11 @@ if( HAVE_BOOLEANS ) {
'true': true
...
'core booleans dump as booleans';

ok builtin::is_bool(Load(<<'...',)->{false}),
---
'false': false
'true': true
...
'booleans loaded as core booleans';
}

0 comments on commit fbaa3b4

Please sign in to comment.