update Sat Sep 12 12:37:01 PDT 2009
[pkgsrc.git] / wip / aria2 / patches / patch-an
1 $NetBSD$
2
3 --- test/RequestTest.cc.orig    2007-08-28 12:36:33.000000000 -0400
4 +++ test/RequestTest.cc
5 @@ -228,8 +228,8 @@ void RequestTest::testRedirectUrl() {
6                        req.getUrl());
7    // currentUrl must be updated
8    CPPUNIT_ASSERT_EQUAL(string("http://aria.rednoah.co.jp/"), req.getCurrentUrl());
9 -  // previousUrl must be updated
10 -  CPPUNIT_ASSERT_EQUAL(string("http://aria.rednoah.com:8080/aria2/index.html"), req.getPreviousUrl());
11 +  // previousUrl must be "" when redirection
12 +  CPPUNIT_ASSERT_EQUAL(string(""), req.getPreviousUrl());
13    CPPUNIT_ASSERT_EQUAL(string("http"), req.getProtocol());
14    CPPUNIT_ASSERT_EQUAL(string("aria.rednoah.co.jp"), req.getHost());
15    CPPUNIT_ASSERT_EQUAL((int32_t)80, req.getPort());
16 @@ -246,15 +246,15 @@ void RequestTest::testRedirectUrl2() {
17    CPPUNIT_ASSERT_EQUAL(string("http://aria.rednoah.com/"), req.getPreviousUrl());
18    bool v2 = req.redirectUrl("http://aria.rednoah.com/403.html");
19  
20 -  // previousUrl is updated
21 -  CPPUNIT_ASSERT_EQUAL(string("http://aria.rednoah.com/download.html"), req.getPreviousUrl());
22 +  // previousUrl must be "" when redirection
23 +  CPPUNIT_ASSERT_EQUAL(string(""), req.getPreviousUrl());
24    // referer is unchagned
25    CPPUNIT_ASSERT_EQUAL(string("http://aria.rednoah.com/"), req.getReferer());
26  
27    bool v3 = req.redirectUrl("http://aria.rednoah.com/error.html");
28  
29 -  // previousUrl is update
30 -  CPPUNIT_ASSERT_EQUAL(string("http://aria.rednoah.com/403.html"), req.getPreviousUrl());
31 +  // previousUrl must be "" when redirection
32 +  CPPUNIT_ASSERT_EQUAL(string(""), req.getPreviousUrl());
33  }
34    
35  void RequestTest::testResetUrl() {