[interchange-cvs] interchange - jon modified dist/test/products/tests.asc

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Wed Dec 10 05:40:46 UTC 2008


User:      jon
Date:      2008-12-10 05:40:46 GMT
Modified:  dist/test/products tests.asc
Log:
Add new test of [value], $Values, and $Session->{values} equivalency.

Revision  Changes    Path
2.34                 interchange/dist/test/products/tests.asc


rev 2.34, prev_rev 2.33
Index: tests.asc
===================================================================
RCS file: /var/cvs/interchange/dist/test/products/tests.asc,v
retrieving revision 2.33
retrieving revision 2.34
diff -u -u -r2.33 -r2.34
--- tests.asc	16 Nov 2008 05:04:07 -0000	2.33
+++ tests.asc	10 Dec 2008 05:40:46 -0000	2.34
@@ -2889,6 +2889,86 @@
 %%
 Test of catalog variable conditional (short and long forms) with "if" tag.
 %%%
+000165
+%%
+[value name=foo set=foo_1 hide=1]
+[value name=bar set=bar_1 hide=1]
+[value name=baz set=baz_1 hide=1]
+
+[calcn]
+    my $out = ''; 
+    for (qw( foo bar baz )) {
+        $out .= "[value $_]=[value $_]\n";
+        $out .= "\$Session->{values}{$_}=$Session->{values}{$_}\n";
+        $out .= "\$Values->{$_}=$Values->{$_}\n";
+        $out .= "\n";
+        $Values->{$_} = $_ . '_2';
+    }   
+    return $out;
+[/calcn]
+
+foo=[value foo] bar=[value bar] baz=[value baz]
+
+[perl]
+    my $out = ''; 
+    for (qw( foo bar baz )) {
+        $out .= "\$Session->{values}{$_}=$Session->{values}{$_}\n";
+    }   
+    return $out;
+[/perl]
+
+[calcn]
+    delete @{$Session->{values}}{qw(foo bar baz)};
+    my $out = '';
+    for (qw( foo bar baz )) {
+        $out .= "[value $_]=[value $_]\n";
+        $out .= "\$Session->{values}{$_}=$Session->{values}{$_}\n";
+        $out .= "\$Values->{$_}=$Values->{$_}\n";
+        $out .= "\n";
+    }
+    return $out;
+[/calcn]
+%%
+[value foo]=foo_2
+\$Session->{values}{foo}=foo_1
+\$Values->{foo}=foo_1
+
+[value bar]=bar_2
+\$Session->{values}{bar}=bar_1
+\$Values->{bar}=bar_1
+
+[value baz]=baz_2
+\$Session->{values}{baz}=baz_1
+\$Values->{baz}=baz_1
+
+
+
+foo=foo_2 bar=bar_2 baz=baz_2
+
+\$Session->{values}{foo}=foo_2
+\$Session->{values}{bar}=bar_2
+\$Session->{values}{baz}=baz_2
+
+
+[value foo]=
+\$Session->{values}{foo}=
+\$Values->{foo}=
+
+[value bar]=
+\$Session->{values}{bar}=
+\$Values->{bar}=
+
+[value baz]=
+\$Session->{values}{baz}=
+\$Values->{baz}=
+
+%%
+
+%%
+
+%%
+Test of [value], $Values, and $Session->{values} equivalency.
+%%%
 999999
 %%
 [the test] [perl]







More information about the interchange-cvs mailing list