|
From: James E. J. Jr. <mu...@us...> - 2003-08-02 06:17:31
|
Update of /cvsroot/psp/psp/lib/tools/t
In directory sc8-pr-cvs1:/tmp/cvs-serv27826/psp/lib/tools/t
Modified Files:
full_compiler.t include.t
Log Message:
depends member now {buildinfo}->{depends}.
communicate alternate includepath as member, not $incpath arg to parse_file().
Index: full_compiler.t
===================================================================
RCS file: /cvsroot/psp/psp/lib/tools/t/full_compiler.t,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- full_compiler.t 13 Nov 2002 16:03:54 -0000 1.2
+++ full_compiler.t 2 Aug 2003 06:17:17 -0000 1.3
@@ -27,8 +27,8 @@
ok !$compiler->compile("pile-src/test.psp");
ok !$compiler->{n_errors};
-ok $compiler->{depends}->[0] eq "pile-src/test.psp";
-ok !$compiler->{depends}->[1];
+ok $compiler->{buildinfo}->{depends}->[0], "pile-src/test.psp";
+ok !$compiler->{buildinfo}->{depends}->[1];
ok !$compiler->{output};
ok length($compiler->{seed}) == 6;
ok !$compiler->{pile_name};
@@ -45,11 +45,11 @@
ok !$compiler->compile("pile-src/test.psp");
ok !$compiler->{n_errors};
-ok $compiler->{depends}->[0] eq "pile-src/test.psp";
-ok !$compiler->{depends}->[1];
+ok $compiler->{buildinfo}->{depends}->[0], "pile-src/test.psp";
+ok !$compiler->{buildinfo}->{depends}->[1];
ok !$compiler->{output};
ok length($compiler->{seed}) == 6;
-ok $compiler->{pile_name} eq "foofoo";
+ok $compiler->{pile_name}, "foofoo";
ok !$compiler->{verbose};
ok 0 == @{$compiler->{includepath}};
ok 0 == keys(%{$compiler->{fieldspaces}});
@@ -75,7 +75,7 @@
ok ! -f $fname."#";
ok !$compiler->{output};
ok length($compiler->{seed}) == 6;
-ok $compiler->{pile_name} eq "foofoo";
+ok $compiler->{pile_name}, "foofoo";
ok 0 == @{$compiler->{includepath}};
ok 0 == keys(%{$compiler->{fieldspaces}});
@@ -88,9 +88,9 @@
ok !$compiler->compile("pile-src/testinc.psp");
-ok $compiler->{depends}->[0] eq "pile-src/testinc.psp";
-ok $compiler->{depends}->[1] eq "pile-src/small.inc";
-ok !$compiler->{depends}->[2];
+ok $compiler->{buildinfo}->{depends}->[0], "pile-src/testinc.psp";
+ok $compiler->{buildinfo}->{depends}->[1], "pile-src/small.inc";
+ok !$compiler->{buildinfo}->{depends}->[2];
ok 1 == @{$compiler->{includepath}};
ok 0 == keys(%{$compiler->{fieldspaces}});
@@ -102,8 +102,8 @@
ok !$compiler->compile("pile-src/emptyform.psp");
-ok $compiler->{depends}->[0] eq "pile-src/emptyform.psp";
-ok !$compiler->{depends}->[1];
+ok $compiler->{buildinfo}->{depends}->[0], "pile-src/emptyform.psp";
+ok !$compiler->{buildinfo}->{depends}->[1];
ok 1 == @{$compiler->{includepath}};
ok 0 == keys(%{$compiler->{fieldspaces}});
@@ -115,8 +115,8 @@
ok !$compiler->compile("pile-src/form.psp");
-ok $compiler->{depends}->[0] eq "pile-src/form.psp";
-ok !$compiler->{depends}->[1];
+ok $compiler->{buildinfo}->{depends}->[0], "pile-src/form.psp";
+ok !$compiler->{buildinfo}->{depends}->[1];
ok 1 == @{$compiler->{includepath}};
ok 0 == keys(%{$compiler->{fieldspaces}});
@@ -129,9 +129,9 @@
ok !$compiler->compile("pile-src/small.fs");
ok !$compiler->compile("pile-src/fsform.psp");
-ok $compiler->{depends}->[0] eq "pile-src/small.fs";
-ok $compiler->{depends}->[1] eq "pile-src/fsform.psp";
-ok !$compiler->{depends}->[2];
+ok $compiler->{buildinfo}->{depends}->[0], "pile-src/small.fs";
+ok $compiler->{buildinfo}->{depends}->[1], "pile-src/fsform.psp";
+ok !$compiler->{buildinfo}->{depends}->[2];
ok 1 == @{$compiler->{includepath}};
ok 1 == keys(%{$compiler->{fieldspaces}});
Index: include.t
===================================================================
RCS file: /cvsroot/psp/psp/lib/tools/t/include.t,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- include.t 13 Nov 2002 16:03:58 -0000 1.2
+++ include.t 2 Aug 2003 06:17:17 -0000 1.3
@@ -17,7 +17,7 @@
package main;
my $n_iterations = 1;
-plan tests => $n_iterations * 83;
+plan tests => $n_iterations * 85;
for (my $n=0; $n<$n_iterations; $n++) {
#create a parser.
@@ -30,14 +30,16 @@
ok !$parser->{pile_name};
ok !@{$parser->{includepath}};
ok !$parser->{sub_lvl};
-ok $parser->{back_compat} eq 1;
+ok $parser->{back_compat}, 1;
ok @{$parser->{propagatable}};
ok !%{$parser->{handlers_begin}};
ok !%{$parser->{handlers_end}};
ok @{$parser->{stack_text_sub}};
ok @{$parser->{stack_code_sub}};
ok !@{$parser->{stack_handlers}};
-ok !@{$parser->{depends}};
+ok !@{$parser->{buildinfo}->{depends}};
+ok !%{$parser->{buildinfo}->{requires}};
+ok !%{$parser->{buildinfo}->{provides}};
ok !%{$parser->{depends_h}};
ok !$parser->{is_cdata};
ok !$parser->{text_to_flush};
@@ -70,7 +72,7 @@
ok $parser = TestParser->new();
ok $parser->parse_file("tmp/test.psp");
-ok @{$parser->{depends}};
+ok @{$parser->{buildinfo}->{depends}};
ok %{$parser->{depends_h}};
ok $parser->{current_fname};
ok $context= $parser->pop_context();
@@ -128,10 +130,11 @@
ok touch_file("tmp/inc/include3.inc");
ok $parser = TestParser->new();
-ok $parser->parse_file("tmp/test.psp",["tmp/inc"]);
+$parser->{includepath} = ["tmp/inc"];
+ok $parser->parse_file("tmp/test.psp");
#print Dumper($parser);
-ok @{$parser->{depends}};
+ok @{$parser->{buildinfo}->{depends}};
ok %{$parser->{depends_h}};
ok $parser->{current_fname};
ok $context= $parser->pop_context();
|