Refs #33765 -- Added tests for trailing whitespace in JavaScript source map references.
This commit is contained in:
parent
d0863429a3
commit
00639dbd6d
|
@ -0,0 +1,2 @@
|
||||||
|
//# sourceMappingURL=source_map.js.map
|
||||||
|
let a_variable = 1;
|
|
@ -280,6 +280,20 @@ class TestHashedFiles:
|
||||||
)
|
)
|
||||||
self.assertPostCondition()
|
self.assertPostCondition()
|
||||||
|
|
||||||
|
def test_js_source_map_trailing_whitespace(self):
|
||||||
|
relpath = self.hashed_file_path("cached/source_map_trailing_whitespace.js")
|
||||||
|
self.assertEqual(
|
||||||
|
relpath, "cached/source_map_trailing_whitespace.cd45b8534a87.js"
|
||||||
|
)
|
||||||
|
with storage.staticfiles_storage.open(relpath) as relfile:
|
||||||
|
content = relfile.read()
|
||||||
|
self.assertNotIn(b"//# sourceMappingURL=source_map.js.map\t ", content)
|
||||||
|
self.assertIn(
|
||||||
|
b"//# sourceMappingURL=source_map.js.99914b932bd3.map",
|
||||||
|
content,
|
||||||
|
)
|
||||||
|
self.assertPostCondition()
|
||||||
|
|
||||||
def test_js_source_map_sensitive(self):
|
def test_js_source_map_sensitive(self):
|
||||||
relpath = self.hashed_file_path("cached/source_map_sensitive.js")
|
relpath = self.hashed_file_path("cached/source_map_sensitive.js")
|
||||||
self.assertEqual(relpath, "cached/source_map_sensitive.5da96fdd3cb3.js")
|
self.assertEqual(relpath, "cached/source_map_sensitive.5da96fdd3cb3.js")
|
||||||
|
|
Loading…
Reference in New Issue