Ignore:
Timestamp:
Apr 7, 2020, 1:12:15 AM (3 months ago)
Author:
Bruno Cornec
Message:

Improve cleanup for tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 0.15.3/pb-modules/t/YAML.t

    r2607 r2608  
    4949
    5050my $tab1 = pb_LoadFile("$ENV{'TMPDIR'}/conf1.yml");
    51 open(FILE,"> $ENV{'TMPDIR'}/conf1bis.yml") || die "Unable to create $ENV{'TMPDIR'}/conf1bis.yml";
    52 print FILE Dumper($tab1);
    53 close(FILE);
     51#open(FILE,"> $ENV{'TMPDIR'}/conf1bis.yml") || die "Unable to create $ENV{'TMPDIR'}/conf1bis.yml";
     52#print FILE Dumper($tab1);
     53#close(FILE);
    5454my $cnt = pb_get_content("$ENV{'TMPDIR'}/conf1.yml");
    5555my $tab2 = pb_Dump($tab1);
    56 open(FILE,"> $ENV{'TMPDIR'}/test1bis.yml") || die "Unable to create $ENV{'TMPDIR'}/test1bis.yml";
    57 print FILE Dumper($tab2);
    58 close(FILE);
     56#open(FILE,"> $ENV{'TMPDIR'}/test1bis.yml") || die "Unable to create $ENV{'TMPDIR'}/test1bis.yml";
     57#print FILE Dumper($tab2);
     58#close(FILE);
    5959open(FILE,"> $ENV{'TMPDIR'}/test1.yml") || die "Unable to create $ENV{'TMPDIR'}/test1.yml";
    6060print FILE "$tab2";
     
    6363is($cnt, $content, "pb_DumpFile Test");
    6464$nt++;
     65unlink("$ENV{'TMPDIR'}/conf1.yml");
     66unlink("$ENV{'TMPDIR'}/test1.yml");
    6567
    6668done_testing($nt);
Note: See TracChangeset for help on using the changeset viewer.