Index: tests/forwardtest.xotcl =================================================================== diff -u -rc72f9f638677608fab1502cd696c8f2d6b2952f9 -r57fe47fb1da11243f88679d61d3b3b172258525a --- tests/forwardtest.xotcl (.../forwardtest.xotcl) (revision c72f9f638677608fab1502cd696c8f2d6b2952f9) +++ tests/forwardtest.xotcl (.../forwardtest.xotcl) (revision 57fe47fb1da11243f88679d61d3b3b172258525a) @@ -195,6 +195,25 @@ ? {obj @list} [list x 1 y 2 z] ? {obj @list a b c} [list x 1 y 2 z a b c] +# adding some test cases which cover the interactions +# between %@POS and %1 substitutions +# + +obj forward @end-13 list {%@end 13} %1 %self +? {obj @end-13 1 2 3 } [list 1 ::obj 2 3 13] + +obj forward @end-13 list %1 {%@end 13} %self +? {obj @end-13 1 2 3 } [list 1 ::obj 2 3 13] + +obj forward @end-13 list {%@end 13} %1 %1 %1 %self +? {obj @end-13 1 2 3 } [list 1 1 1 ::obj 2 3 13] + +obj forward @end-13 list {%@-1 13} %1 %self +? {obj @end-13 1 2 3 } [list 1 ::obj 2 13 3] + +obj forward @end-13 list {%@1 13} %1 %self +? {obj @end-13 1 2 3 } [list 13 1 ::obj 2 3] + ############################################### # substitution depending on number of arguments ############################################### @@ -320,4 +339,4 @@ ? {C t ::c1 {[my xx]}} ::c1 ? {C t ::c1 {[my info class]}} ::C ? {C t ::c1 {[my istype C]}} 1 -? {C t ::c1 {[my istype ::C]}} 1 \ No newline at end of file +? {C t ::c1 {[my istype ::C]}} 1