~ubuntu-branches/ubuntu/natty/curl/natty-security

« back to all changes in this revision

Viewing changes to tests/libtest/lib519.c

  • Committer: Bazaar Package Importer
  • Author(s): Bhavani Shankar
  • Date: 2010-06-20 13:56:28 UTC
  • mfrom: (3.4.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100620135628-e30tp9jldq6hq985
Tags: 7.21.0-1ubuntu1
* Merge from debian unstable.  Remaining changes: LP: #596334
  - Keep build deps in main:
    - Drop build dependencies: stunnel, libssh2-1-dev
    - Add build-dependency on openssh-server
    - Drop libssh2-1-dev from libcurl4-openssl-dev's Depends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *                            | (__| |_| |  _ <| |___
6
6
 *                             \___|\___/|_| \_\_____|
7
7
 *
8
 
 * $Id: lib519.c,v 1.5 2008-09-20 04:26:57 yangtse Exp $
9
8
 */
10
9
 
11
10
#include "test.h"
28
27
    return TEST_ERR_MAJOR_BAD;
29
28
  }
30
29
 
31
 
  curl_easy_setopt(curl, CURLOPT_URL, URL);
32
 
  curl_easy_setopt(curl, CURLOPT_USERPWD, "monster:underbed");
33
 
  curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
34
 
  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
30
  test_setopt(curl, CURLOPT_URL, URL);
 
31
  test_setopt(curl, CURLOPT_USERPWD, "monster:underbed");
 
32
  test_setopt(curl, CURLOPT_HEADER, 1L);
 
33
  test_setopt(curl, CURLOPT_VERBOSE, 1L);
35
34
 
36
35
  /* get first page */
37
36
  res = curl_easy_perform(curl);
38
37
 
39
 
  curl_easy_setopt(curl, CURLOPT_USERPWD, "anothermonster:inwardrobe");
 
38
  test_setopt(curl, CURLOPT_USERPWD, "anothermonster:inwardrobe");
40
39
 
41
40
  /* get second page */
42
41
  res = curl_easy_perform(curl);
43
42
 
 
43
test_cleanup:
 
44
 
44
45
  curl_easy_cleanup(curl);
45
46
  curl_global_cleanup();
46
47