Browse Source

Add test confirming issue #185.

Andreas Stenius 10 years ago
parent
commit
64f988659a
1 changed files with 6 additions and 0 deletions
  1. 6 0
      test/erlydtl_test_defs.erl

+ 6 - 0
test/erlydtl_test_defs.erl

@@ -687,6 +687,12 @@ all_test_defs() ->
        {"|pluralize:\"y,es\" (list)",
         <<"{{ num|pluralize:\"y,es\" }}">>, [{num, 2}],
         <<"es">>},
+       {"|length|pluralize",
+        <<"{{ list|length|pluralize:\"plural\" }}">>, [{list, [foo, bar]}],
+        <<"plural">>},
+       {"|length|pluralize",
+        <<"{{ list|length|pluralize:\"plural\" }}">>, [{list, [foo]}],
+        <<"">>},
        {"|random",
         <<"{{ var1|random }}">>, [{var1, ["foo", "foo", "foo"]}],
         <<"foo">>},