diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2006-06-20 07:12:45 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2006-06-20 07:12:45 +0000 |
| commit | 3e97535907baa7b57c9bf322871ef6243e2045a9 (patch) | |
| tree | 5582b52d992a79567ed86fdeb5bac5aa7f544eb8 /tests/regressiontests/initial_sql_regress | |
| parent | a513fcb455c31e574821e966cd199efca52edd6d (diff) | |
Fixed #2161 -- handle trailing newlines in initial SQL data. Includes
regression test. Thanks to russellm.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3177 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/initial_sql_regress')
| -rw-r--r-- | tests/regressiontests/initial_sql_regress/__init__.py | 0 | ||||
| -rw-r--r-- | tests/regressiontests/initial_sql_regress/models.py | 13 | ||||
| -rw-r--r-- | tests/regressiontests/initial_sql_regress/sql/simple.sql | 5 |
3 files changed, 18 insertions, 0 deletions
diff --git a/tests/regressiontests/initial_sql_regress/__init__.py b/tests/regressiontests/initial_sql_regress/__init__.py new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/tests/regressiontests/initial_sql_regress/__init__.py diff --git a/tests/regressiontests/initial_sql_regress/models.py b/tests/regressiontests/initial_sql_regress/models.py new file mode 100644 index 0000000000..c4cf12bdf7 --- /dev/null +++ b/tests/regressiontests/initial_sql_regress/models.py @@ -0,0 +1,13 @@ +""" +Regression tests for initial SQL insertion. +""" + +from django.db import models + +class Simple(models.Model): + name = models.CharField(maxlength = 50) + +API_TESTS = "" + +# NOTE: The format of the included SQL file for this test suite is important. +# It must end with a trailing newline in order to test the fix for #2161. diff --git a/tests/regressiontests/initial_sql_regress/sql/simple.sql b/tests/regressiontests/initial_sql_regress/sql/simple.sql new file mode 100644 index 0000000000..ac60c0c3d6 --- /dev/null +++ b/tests/regressiontests/initial_sql_regress/sql/simple.sql @@ -0,0 +1,5 @@ +INSERT INTO initial_sql_regress_simple (name) VALUES ('John'); +INSERT INTO initial_sql_regress_simple (name) VALUES ('Paul'); +INSERT INTO initial_sql_regress_simple (name) VALUES ('Ringo'); +INSERT INTO initial_sql_regress_simple (name) VALUES ('George'); + |
