You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by ge...@apache.org on 2003/10/23 15:25:31 UTC

cvs commit: jakarta-velocity/test/templates map.vm

geirm       2003/10/23 06:25:31

  Modified:    test/templates map.vm
  Log:
  tests for VTL Map creation syntax
  
  Revision  Changes    Path
  1.4       +18 -0     jakarta-velocity/test/templates/map.vm
  
  Index: map.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity/test/templates/map.vm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- map.vm	18 Jan 2001 04:37:35 -0000	1.3
  +++ map.vm	23 Oct 2003 13:25:31 -0000	1.4
  @@ -23,3 +23,21 @@
   #set( $hashmap.Foo = "foovalue")
   $hashmap.Foo
   $hashmap.get("Foo")
  +
  +
  +##
  +##  test the support for the Map creation syntax
  +##
  +#set($key = 'key')
  +#set($value = 'value')
  +
  +#set($mymap = [ "a" : "aval", 'b' : 'bval', 1 : 2, $key :  $value, 'hash' : $hashmap ] )
  +
  +$mymap.a
  +$mymap.get("a")
  +$mymap.b
  +$mymap.get('b')
  +$mymap.get(1)
  +$mymap.get($key)
  +$mymap.hash.Foo
  +
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org