diff options
author | Claude Brisson <cbrisson@apache.org> | 2019-04-16 09:22:58 +0000 |
---|---|---|
committer | Claude Brisson <cbrisson@apache.org> | 2019-04-16 09:22:58 +0000 |
commit | 8705542a685ae3eb4417a7ba2182a1892efcc6c8 (patch) | |
tree | 042901906a62e77512e83a0aa18ba5e2463b4319 /velocity-engine-core/src/test | |
parent | 0b2e0213a25fba6a96613bdbd2e892afd196e838 (diff) | |
download | apache-velocity-engine-8705542a685ae3eb4417a7ba2182a1892efcc6c8.tar.gz |
[engine] Fix VELOCITY-912 : hyphen in identifiers for subproperties
git-svn-id: https://svn.apache.org/repos/asf/velocity/engine/trunk@1857633 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'velocity-engine-core/src/test')
-rw-r--r-- | velocity-engine-core/src/test/java/org/apache/velocity/test/HyphenInIdentifiersTestCase.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/velocity-engine-core/src/test/java/org/apache/velocity/test/HyphenInIdentifiersTestCase.java b/velocity-engine-core/src/test/java/org/apache/velocity/test/HyphenInIdentifiersTestCase.java index 4ab2b8b2..e1fdce19 100644 --- a/velocity-engine-core/src/test/java/org/apache/velocity/test/HyphenInIdentifiersTestCase.java +++ b/velocity-engine-core/src/test/java/org/apache/velocity/test/HyphenInIdentifiersTestCase.java @@ -42,4 +42,9 @@ public class HyphenInIdentifiersTestCase extends BaseTestCase { assertEvalEquals("6","#set($var-1 = 7)#set($var-2 = $var-1 - 1)$var-2"); } + + public void testHyphenInCollection() + { + assertEvalEquals("foofoofoo","#set($map = {'name-with-hyphen':'foo'})$map.name-with-hyphen${map.name-with-hyphen}${map.get('name-with-hyphen')}"); + } } |