~ubuntu-branches/ubuntu/utopic/gnustep-base/utopic

« back to all changes in this revision

Viewing changes to Tests/base/NSHTTPCookie/basic.m

  • Committer: Package Import Robot
  • Author(s): Paul Gevers
  • Date: 2014-07-19 13:02:18 UTC
  • mfrom: (20.1.6 utopic-proposed)
  • Revision ID: package-import@ubuntu.com-20140719130218-pn967l7wzjjf90yi
Tags: 1.24.6-2ubuntu1
* debian/rules:
  - Print the config.log if configure fails to debug
    powerpc/ppc64el FTBFS. (LP: #1277975)

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
  TEST_FOR_CLASS(@"NSHTTPCookie", cookie,
20
20
    "NSHTTPCookie +cookieWithProperties: returns an NSHTTPCookie");
21
21
  
 
22
  dict = [NSDictionary dictionaryWithObjectsAndKeys:
 
23
    @"myname", NSHTTPCookieName,
 
24
    @"myvalue", NSHTTPCookieValue,
 
25
    @"/mypath", NSHTTPCookiePath,
 
26
    @".test.com", NSHTTPCookieDomain,
 
27
    @"http://www.origin.org", NSHTTPCookieOriginURL,
 
28
    @"0", NSHTTPCookieVersion,
 
29
    @"FALSE", NSHTTPCookieDiscard,
 
30
    @"FALSE", NSHTTPCookieSecure,
 
31
    nil];
 
32
  cookie = [NSHTTPCookie cookieWithProperties: dict];
 
33
  TEST_FOR_CLASS(@"NSHTTPCookie", cookie,
 
34
    "NSHTTPCookie +cookieWithProperties: works with all constants");
 
35
  
22
36
  dict = [NSDictionary dictionaryWithObjectsAndKeys: @"myname", @"Name", 
23
37
        @"myvalue", @"Value", @".test.com", @"Domain", nil];
24
38
  cookie = [NSHTTPCookie cookieWithProperties: dict];
25
39
  PASS(cookie == nil, "cookie without path returns nil");
26
40
 
27
41
  dict = [NSDictionary dictionaryWithObject:
28
 
        @"S=calendar=R7tjDKqNB5L8YTZSvf29Bg;Expires=Wed, 09-Mar-2011 23:00:35 GMT"
 
42
    @"S=calendar=R7tjDKqNB5L8YTZSvf29Bg;Expires=Wed, 09-Mar-2011 23:00:35 GMT"
29
43
                                     forKey: @"Set-Cookie"];
30
44
 
31
45
  url = [NSURL URLWithString: @"http://www.google.com/calendar/feeds/default/"];
41
55
           "NSHTTPCookie returns proper domain");
42
56
  
43
57
  dict = [NSHTTPCookie requestHeaderFieldsWithCookies: cookies];
44
 
  PASS([[dict objectForKey: @"Cookie"] isEqual: @"S=calendar=R7tjDKqNB5L8YTZSvf29Bg"],
45
 
        "NSHTTPCookie can generate proper cookie");
 
58
  PASS_EQUAL([dict objectForKey: @"Cookie"],
 
59
    @"S=calendar=R7tjDKqNB5L8YTZSvf29Bg",
 
60
    "NSHTTPCookie can generate proper cookie");
46
61
 
47
62
  [arp release]; arp = nil;
48
63
  return 0;