Skip Menu |

This queue is for tickets about the Config-Properties CPAN distribution.

Report information
The Basics
Id: 45222
Status: resolved
Worked: 15 min
Priority: 0/
Queue: Config-Properties

People
Owner: salva [...] cpan.org
Requestors: ian-cpan [...] indecorous.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.69
Fixed in: (no value)



Subject: Test 6_sorted.t fails on Win32 under Strawberry Perl
The test doesn't close the filehandle CFG and Windows refuses to delete an open file, so the 'delete test file' test fails. I've attached an updated .t file with a close statement included. Thanks Ian
Subject: 6_sorted.t
use Test::More tests => 2; use Config::Properties; use File::Temp qw(tempfile); my $cfg=Config::Properties->new(); $cfg->load(\*DATA); my ($fh, $fn)=tempfile() or die "unable to create temporal file to save properties"; $cfg->deleteProperty('dos'); $cfg->setProperty('cinco', '5'); $cfg->setProperty('tres', '6!'); $cfg->store($fh, "test header"); close $fh; open CFG, '<', $fn or die "unable to open tempory file $fn"; undef $/; $contents=<CFG>; close CFG; # print STDERR "$fn\n$contents\n"; ok($contents=~/uno.*tres.*cuatro.*cinco/s, "order preserved"); unlink $fn; ok((not -e $fn), "delete test file"); __DATA__ uno = 1u dos = 2u tres = 3u cuatro = 4u
solved in 1.70