~ubuntu-branches/ubuntu/wily/trafficserver/wily

« back to all changes in this revision

Viewing changes to proxy/hdrs/test_header.cc

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2012-12-17 22:28:16 UTC
  • mfrom: (5.1.8 raring-proposed)
  • Revision ID: package-import@ubuntu.com-20121217222816-7xwjsx5k76zkb63d
Tags: 3.2.0-1ubuntu1
* Revert FreeBSD strerror_r() fixes that give errors with glibc 2.16.
* Apply patch from Konstantinos Margaritis to define barriers on ARM.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/** @file
2
2
 
3
 
  A brief file description
 
3
  test code for sanity checking the header system is functioning properly
4
4
 
5
5
  @section license License
6
6
 
21
21
  limitations under the License.
22
22
 */
23
23
 
24
 
/****************************************************************************
25
 
 
26
 
   test_header.cc
27
 
 
28
 
   Description:
29
 
       test code for sanity checking the header system is functioning
30
 
         properly
31
 
 
32
 
 
33
 
 ****************************************************************************/
34
24
 
35
25
#include <stdlib.h>
36
26
#include <string.h>
1004
994
  int failures = 0;
1005
995
 
1006
996
  // (1) prepend
1007
 
  strcpy(buff, "de, fr, en");
 
997
  ink_strlcpy(buff, "de, fr, en", sizeof(buff));
1008
998
  targ = buff + 0;
1009
999
  repl = "oo, ";
1010
1000
  good = "oo, de, fr, en";
1014
1004
    ++failures;
1015
1005
  }
1016
1006
  // (2) append
1017
 
  strcpy(buff, "de, fr, en");
 
1007
  ink_strlcpy(buff, "de, fr, en", sizeof(buff));
1018
1008
  targ = buff + 10;
1019
1009
  repl = ", bloop";
1020
1010
  good = "de, fr, en, bloop";
1024
1014
    ++failures;
1025
1015
  }
1026
1016
  // (3) delete middle
1027
 
  strcpy(buff, "de, fr, en");
 
1017
  ink_strlcpy(buff, "de, fr, en", sizeof(buff));
1028
1018
  targ = buff + 4;
1029
1019
  repl = "";
1030
1020
  good = "de, en";