diff --git a/tests/regressiontests/templates/tests.py b/tests/regressiontests/templates/tests.py
index 62b2237a83ebc..7acc98b8199a8 100644
--- a/tests/regressiontests/templates/tests.py
+++ b/tests/regressiontests/templates/tests.py
@@ -1049,6 +1049,9 @@ def get_template_tests(self):
'spaceless01': ("{% spaceless %} text {% endspaceless %}", {}, " text "),
'spaceless02': ("{% spaceless %} \n text \n {% endspaceless %}", {}, " text "),
'spaceless03': ("{% spaceless %}text{% endspaceless %}", {}, "text"),
+ 'spaceless04': ("{% spaceless %} {{ text }} {% endspaceless %}", {'text' : 'This & that'}, "This & that"),
+ 'spaceless05': ("{% autoescape off %}{% spaceless %} {{ text }} {% endspaceless %}{% endautoescape %}", {'text' : 'This & that'}, "This & that"),
+ 'spaceless06': ("{% spaceless %} {{ text|safe }} {% endspaceless %}", {'text' : 'This & that'}, "This & that"),
# simple translation of a string delimited by '
'i18n01': ("{% load i18n %}{% trans 'xxxyyyxxx' %}", {}, "xxxyyyxxx"),