Changeset 2493 in ProjectBuilder
- Timestamp:
- Mar 31, 2020, 12:55:32 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/t/Conf.t
r2278 r2493 39 39 40 40 pb_conf_init("test"); 41 open(FILE,"> $ENV{'TMPDIR'}/conf. pb") || die "Unable to create $ENV{'TMPDIR'}/conf.pb";41 open(FILE,"> $ENV{'TMPDIR'}/conf.yml") || die "Unable to create $ENV{'TMPDIR'}/conf.yml"; 42 42 if ($projectbuilderconfver < 1) { 43 43 # Old conf file format 44 44 # should be in alphabetic order 45 print FILE "truc mageia-4-x86_64 = la tete a toto\n"; 45 print FILE "colon mageia-3-x86_64 = ex: test\n"; 46 print FILE "percent mageia-3-x86_64 = %check\n"; 47 print FILE "truc mageia-4-x86_64 = la tete à toto\n"; 46 48 print FILE "yorro mageia-3-x86_64 = tartampion\n"; 47 print FILE "zz mageia-3-x86_64 = yy\n";49 print FILE "zz mageia-3-x86_64 =\n"; 48 50 } else { 49 51 print FILE "---\n"; 52 print FILE "colon:\n"; 53 print FILE " mageia-3-x86_64: 'ex: test'\n"; 54 print FILE "percent:\n"; 55 print FILE " mageia-3-x86_64: '%check'\n"; 50 56 print FILE "truc:\n"; 51 print FILE " mageia-4-x86_64: la tete atoto\n";57 print FILE " mageia-4-x86_64: la tete à toto\n"; 52 58 print FILE "yorro:\n"; 53 59 print FILE " mageia-3-x86_64: tartampion\n"; … … 56 62 } 57 63 close(FILE); 58 my $cnt = pb_get_content("$ENV{'TMPDIR'}/conf. pb");64 my $cnt = pb_get_content("$ENV{'TMPDIR'}/conf.yml"); 59 65 60 66 my %h; 61 67 my $h = \%h; 62 $h = pb_conf_cache("$ENV{'TMPDIR'}/conf. pb",$h);63 pb_conf_write("$ENV{'TMPDIR'}/test. pb",$h);64 my $content = pb_get_content("$ENV{'TMPDIR'}/test. pb");68 $h = pb_conf_cache("$ENV{'TMPDIR'}/conf.yml",$h); 69 pb_conf_write("$ENV{'TMPDIR'}/test.yml",$h); 70 my $content = pb_get_content("$ENV{'TMPDIR'}/test.yml"); 65 71 is($cnt, $content, "pb_conf_write Test"); 66 72 $nt++; 67 unlink("$ENV{'TMPDIR'}/conf.pb");68 unlink("$ENV{'TMPDIR'}/test.pb");73 #unlink("$ENV{'TMPDIR'}/conf.yml"); 74 #unlink("$ENV{'TMPDIR'}/test.yml"); 69 75 70 76 done_testing($nt);
Note:
See TracChangeset
for help on using the changeset viewer.