diff options
author | Leonard Richardson <leonardr@segfault.org> | 2013-10-01 22:15:53 -0400 |
---|---|---|
committer | Leonard Richardson <leonardr@segfault.org> | 2013-10-01 22:15:53 -0400 |
commit | 2480f1622a71eb500aa5dcabdeb8cf447c283bde (patch) | |
tree | 6ef08cf3c4993ead6ac6f9d8fedc8d0f773c8cb9 /bs4/tests/test_soup.py | |
parent | be859b1cddf8dfa18708b5081a8af3af013cfed4 (diff) | |
download | beautifulsoup4-2480f1622a71eb500aa5dcabdeb8cf447c283bde.tar.gz |
Fixed a crash when a short input contains data not valid in
filenames. [bug=1232604]
Diffstat (limited to 'bs4/tests/test_soup.py')
-rw-r--r-- | bs4/tests/test_soup.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bs4/tests/test_soup.py b/bs4/tests/test_soup.py index 79a2bc5..b0247fe 100644 --- a/bs4/tests/test_soup.py +++ b/bs4/tests/test_soup.py @@ -43,6 +43,12 @@ class TestConstructor(SoupTest): soup = self.soup(data) self.assertEqual(u"éé", soup.h1.string) + def test_embedded_null(self): + data = u"<h1>foo\0bar</h1>" + soup = self.soup(data) + self.assertEqual(u"foo\0bar", soup.h1.string) + + class TestDeprecatedConstructorArguments(SoupTest): def test_parseOnlyThese_renamed_to_parse_only(self): |