Changeset 2608 in ProjectBuilder


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

Improve cleanup for tests

Files:
4 edited

Legend:

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

    r2607 r2608  
    7171is($cnt, $content, "pb_conf_write Test");
    7272$nt++;
    73 #unlink("$ENV{'TMPDIR'}/conf.yml");
    74 #unlink("$ENV{'TMPDIR'}/test.yml");
     73unlink("$ENV{'TMPDIR'}/conf.yml");
     74unlink("$ENV{'TMPDIR'}/test.yml");
    7575
    7676done_testing($nt);
  • 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);
  • devel/pb-modules/t/Conf.t

    r2607 r2608  
    7171is($cnt, $content, "pb_conf_write Test");
    7272$nt++;
    73 #unlink("$ENV{'TMPDIR'}/conf.yml");
    74 #unlink("$ENV{'TMPDIR'}/test.yml");
     73unlink("$ENV{'TMPDIR'}/conf.yml");
     74unlink("$ENV{'TMPDIR'}/test.yml");
    7575
    7676done_testing($nt);
  • devel/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.