Skip to content

Commit 5dabc30

Browse files
committed
Add previously failing test for missing last line break
1 parent 30b136d commit 5dabc30

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,10 @@
194194
}
195195
"""
196196

197+
TESTBLOCK_CASE_12 = """
198+
server{
199+
}"""
200+
197201

198202
class TestPythonNginx(unittest.TestCase):
199203
def test_basic_load(self):
@@ -312,6 +316,9 @@ def test_missing_semi_colon(self):
312316
nginx.loads(TESTBLOCK_CASE_11)
313317
self.assertEqual(str(e.value), "Config syntax, missing ';' at index: 189")
314318

319+
def test_server_without_last_linebreak(self):
320+
self.assertTrue(nginx.loads(TESTBLOCK_CASE_12) is not None)
321+
315322

316323
if __name__ == '__main__':
317324
unittest.main()

0 commit comments

Comments
 (0)