summaryrefslogtreecommitdiff
path: root/tests/regressiontests/defaultfilters
diff options
context:
space:
mode:
authorRobin Munn <robin.munn@gmail.com>2007-01-31 23:43:09 +0000
committerRobin Munn <robin.munn@gmail.com>2007-01-31 23:43:09 +0000
commitfe361e678a46dc4c717c79c2f12b3ba32293b81a (patch)
tree8f42488e7d95244bab3db7b2bf934e006940521a /tests/regressiontests/defaultfilters
parent122426e7453ed638a0c5be7e8b925adcddea3889 (diff)
Merged revisions 4186 to 4454 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/sqlalchemy@4455 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/defaultfilters')
-rw-r--r--tests/regressiontests/defaultfilters/tests.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/regressiontests/defaultfilters/tests.py b/tests/regressiontests/defaultfilters/tests.py
index 32d6ef5202..439a40c31b 100644
--- a/tests/regressiontests/defaultfilters/tests.py
+++ b/tests/regressiontests/defaultfilters/tests.py
@@ -11,6 +11,26 @@ r"""
'0.0'
>>> floatformat(0.0)
'0'
+>>> floatformat(7.7,3)
+'7.700'
+>>> floatformat(6.000000,3)
+'6.000'
+>>> floatformat(13.1031,-3)
+'13.103'
+>>> floatformat(11.1197, -2)
+'11.12'
+>>> floatformat(11.0000, -2)
+'11'
+>>> floatformat(11.000001, -2)
+'11.00'
+>>> floatformat(8.2798, 3)
+'8.280'
+>>> floatformat('foo')
+''
+>>> floatformat(13.1031, 'bar')
+'13.1031'
+>>> floatformat('foo', 'bar')
+''
>>> addslashes('"double quotes" and \'single quotes\'')
'\\"double quotes\\" and \\\'single quotes\\\''