summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorhirosan <h-marumoto@cybozu.co.jp>2025-05-04 06:34:15 +0900
committerGitHub <noreply@github.com>2025-05-03 23:34:15 +0200
commit4ff25bbe59b605bd928d2bd865a1f5ca32509e09 (patch)
treeec0ebff8ebd60fc1ce89f99eb66b375b2fa358a2 /tests
parentafbd71b868c7f5a1b2e55b1074b6758cac2f362f (diff)
downloadsmarty-4ff25bbe59b605bd928d2bd865a1f5ca32509e09.tar.gz
smarty-4ff25bbe59b605bd928d2bd865a1f5ca32509e09.tar.bz2
smarty-4ff25bbe59b605bd928d2bd865a1f5ca32509e09.zip
Support trailing comma in array (#1128)
Diffstat (limited to 'tests')
-rw-r--r--tests/UnitTests/TemplateSource/ValueTests/Array/ArrayTest.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/UnitTests/TemplateSource/ValueTests/Array/ArrayTest.php b/tests/UnitTests/TemplateSource/ValueTests/Array/ArrayTest.php
index 94391ddd..096a38c7 100644
--- a/tests/UnitTests/TemplateSource/ValueTests/Array/ArrayTest.php
+++ b/tests/UnitTests/TemplateSource/ValueTests/Array/ArrayTest.php
@@ -70,6 +70,8 @@ class ArrayTest extends PHPUnit_Smarty
array('{$foo=[1,2,[7,8,9],4,5]}{$x=2}{$foo.$x.0}', '7', 'T13', $i++),
array('{$foo=[1,2,[7,8,9],4,5]}{$x=0}{$foo.2.$x}', '7', 'T14', $i++),
array('{$foo=[1,2,[7,8,9],4,5]}{$x=[1,0]}{$foo.2.{$x.1}}', '7', 'T15', $i++),
+ array('{$foo=[1,2,3,4,5,]}{foreach $foo as $bar}{$bar}{/foreach}', '12345', 'T16', $i++),
+ array('{$foo=[1,2,3,4,5,[6,7,8,],]}{$foo[5][2]}', '8', 'T17', $i++),
);
}
}