From 817e550aa1da0eab8b9116f46f8d65a80fcb46e2 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sun, 22 Jul 2012 15:26:05 +1200 Subject: Multiline specifications for pathod and pathoc. --- test/test_rparse.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'test/test_rparse.py') diff --git a/test/test_rparse.py b/test/test_rparse.py index 1527bddf..8d157a10 100644 --- a/test/test_rparse.py +++ b/test/test_rparse.py @@ -250,6 +250,34 @@ class TestParseRequest: r = rparse.parse_request({}, 'GET:"/foo"') assert str(r) + def test_multiline(self): + l = """ + GET + "/foo" + ir,@1 + """ + r = rparse.parse_request({}, l) + assert r.method == "GET" + assert r.path == "/foo" + assert r.actions + + + l = """ + GET + + "/foo + + + + bar" + + ir,@1 + """ + r = rparse.parse_request({}, l) + assert r.method == "GET" + assert r.path.s.endswith("bar") + assert r.actions + class TestParseResponse: def test_parse_err(self): -- cgit v1.2.3