~ubuntu-branches/debian/sid/subversion/sid

« back to all changes in this revision

Viewing changes to subversion/tests/libsvn_subr/translate-test.c

  • Committer: Package Import Robot
  • Author(s): James McCoy
  • Date: 2015-08-07 21:32:47 UTC
  • mfrom: (0.2.15) (4.1.7 experimental)
  • Revision ID: package-import@ubuntu.com-20150807213247-ozyewtmgsr6tkewl
Tags: 1.9.0-1
* Upload to unstable
* New upstream release.
  + Security fixes
    - CVE-2015-3184: Mixed anonymous/authenticated path-based authz with
      httpd 2.4
    - CVE-2015-3187: svn_repos_trace_node_locations() reveals paths hidden
      by authz
* Add >= 2.7 requirement for python-all-dev Build-Depends, needed to run
  tests.
* Remove Build-Conflicts against ruby-test-unit.  (Closes: #791844)
* Remove patches/apache_module_dependency in favor of expressing the
  dependencies in authz_svn.load/dav_svn.load.
* Build-Depend on apache2-dev (>= 2.4.16) to ensure ap_some_authn_required()
  is available when building mod_authz_svn and Depend on apache2-bin (>=
  2.4.16) for runtime support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
/*** Helpers ***/
49
49
 
50
50
/* (Almost) all the tests share the same test data. */
51
 
const char *lines[] =
 
51
static const char *lines[] =
52
52
  {
53
53
    "Line 1: fairly boring subst test data... blah blah",
54
54
    "Line 2: fairly boring subst test data... blah blah.",
223
223
static svn_error_t *
224
224
create_file(const char *fname, const char *eol_str, apr_pool_t *pool)
225
225
{
226
 
  apr_status_t apr_err;
227
226
  apr_file_t *f;
228
227
  apr_size_t i, j;
229
228
 
230
 
  apr_err = apr_file_open(&f, fname,
 
229
  SVN_ERR(svn_io_file_open(&f, fname,
231
230
                          (APR_WRITE | APR_CREATE | APR_EXCL | APR_BINARY),
232
 
                          APR_OS_DEFAULT, pool);
233
 
  if (apr_err)
234
 
    return svn_error_create(apr_err, NULL, fname);
 
231
                          APR_OS_DEFAULT, pool));
235
232
 
236
233
  for (i = 0; i < (sizeof(lines) / sizeof(*lines)); i++)
237
234
    {
243
240
         fprintf() doing a newline conversion? */
244
241
      for (j = 0; this_eol_str[j]; j++)
245
242
        {
246
 
          apr_err = apr_file_putc(this_eol_str[j], f);
247
 
          if (apr_err)
248
 
            return svn_error_create(apr_err, NULL, fname);
249
 
        }
250
 
    }
251
 
 
252
 
  apr_err = apr_file_close(f);
253
 
  if (apr_err)
254
 
    return svn_error_create(apr_err, NULL, fname);
255
 
 
256
 
  return SVN_NO_ERROR;
257
 
}
258
 
 
259
 
 
260
 
/* If FNAME is a regular file, remove it; if it doesn't exist at all,
261
 
   return success.  Otherwise, return error. */
262
 
static svn_error_t *
263
 
remove_file(const char *fname, apr_pool_t *pool)
264
 
{
265
 
  apr_status_t apr_err;
266
 
  apr_finfo_t finfo;
267
 
 
268
 
  if (apr_stat(&finfo, fname, APR_FINFO_TYPE, pool) == APR_SUCCESS)
269
 
    {
270
 
      if (finfo.filetype == APR_REG)
271
 
        {
272
 
          apr_err = apr_file_remove(fname, pool);
273
 
          if (apr_err)
274
 
            return svn_error_create(apr_err, NULL, fname);
275
 
        }
276
 
      else
277
 
        return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
278
 
                                 "non-file '%s' is in the way", fname);
279
 
    }
280
 
 
281
 
  return SVN_NO_ERROR;
282
 
}
283
 
 
 
243
          SVN_ERR(svn_io_file_putc(this_eol_str[j], f, pool));
 
244
        }
 
245
    }
 
246
 
 
247
  return svn_error_trace(svn_io_file_close(f, pool));
 
248
}
284
249
 
285
250
/* Set up, run, and verify the results of a substitution.
286
251
 *
325
290
  apr_size_t idx = 0;
326
291
  apr_size_t i;
327
292
  const char *expect[(sizeof(lines) / sizeof(*lines))];
328
 
  const char *src_fname = apr_pstrcat(pool, test_name, ".src", (char *)NULL);
329
 
  const char *dst_fname = apr_pstrcat(pool, test_name, ".dst", (char *)NULL);
 
293
  const char *src_fname = apr_pstrcat(pool, test_name, ".src", SVN_VA_NULL);
 
294
  const char *dst_fname = apr_pstrcat(pool, test_name, ".dst", SVN_VA_NULL);
330
295
  svn_string_t *val;
331
296
  apr_pool_t *subpool = svn_pool_create(pool);
332
297
 
333
298
  /** Clean up from previous tests, set up src data, and convert. **/
334
 
  SVN_ERR(remove_file(src_fname, pool));
335
 
  SVN_ERR(remove_file(dst_fname, pool));
 
299
  SVN_ERR(svn_io_remove_file2(src_fname, TRUE, pool));
 
300
  SVN_ERR(svn_io_remove_file2(dst_fname, TRUE, pool));
336
301
  SVN_ERR(create_file(src_fname, src_eol, pool));
337
302
 
338
303
  if (rev)
395
360
      else
396
361
        {
397
362
          svn_error_clear(err);
398
 
          SVN_ERR(remove_file(src_fname, pool));
 
363
          SVN_ERR(svn_io_remove_file2(src_fname, FALSE, pool));
399
364
          return SVN_NO_ERROR;
400
365
        }
401
366
 
419
384
                        "Valid $LastChangedRevision: ",
420
385
                        rev,
421
386
                        " $, started unexpanded.",
422
 
                        (char *)NULL);
 
387
                        SVN_VA_NULL);
423
388
          expect[5 - 1] =
424
389
            apr_pstrcat(pool, "Line 5: ",
425
390
                        "Valid $Rev: ", rev, " $, started unexpanded.",
426
 
                        (char *)NULL);
 
391
                        SVN_VA_NULL);
427
392
          expect[26 - 1] =
428
393
            apr_pstrcat(pool, "Line 26: ",
429
394
                        "Emptily expanded keyword $Rev: ", rev," $.",
430
 
                        (char *)NULL);
 
395
                        SVN_VA_NULL);
431
396
          expect[29 - 1] =
432
397
            apr_pstrcat(pool, "Line 29: ",
433
398
                        "Valid $LastChangedRevision: ",
434
399
                        rev,
435
400
                        " $, started expanded.",
436
 
                        (char *)NULL);
 
401
                        SVN_VA_NULL);
437
402
          expect[30 - 1] =
438
403
            apr_pstrcat(pool, "Line 30: ",
439
404
                        "Valid $Rev: ",
440
405
                        rev,
441
406
                        " $, started expanded.",
442
 
                        (char *)NULL);
 
407
                        SVN_VA_NULL);
443
408
        }
444
409
      else  /* unexpand */
445
410
        {
462
427
                        "Valid $LastChangedDate: ",
463
428
                        date,
464
429
                        " $, started unexpanded.",
465
 
                        (char *)NULL);
 
430
                        SVN_VA_NULL);
466
431
          expect[13 - 1] =
467
432
            apr_pstrcat(pool, "Line 13: ",
468
433
                        "Valid $Date: ", date, " $, started unexpanded.",
469
 
                        (char *)NULL);
 
434
                        SVN_VA_NULL);
470
435
          expect[33 - 1] =
471
436
            apr_pstrcat(pool, "Line 33: ",
472
437
                        "Valid $LastChangedDate: ",
473
438
                        date,
474
439
                        " $, started expanded.",
475
 
                        (char *)NULL);
 
440
                        SVN_VA_NULL);
476
441
          expect[34 - 1] =
477
442
            apr_pstrcat(pool, "Line 34: ",
478
443
                        "Valid $Date: ", date, " $, started expanded.",
479
 
                        (char *)NULL);
 
444
                        SVN_VA_NULL);
480
445
          expect[51 - 1] =
481
446
            apr_pstrcat(pool, "Line 51: ",
482
447
                        "same, but with embedded keyword ",
483
448
                        "$$$$$$$$Date: ", date, " $$$$$$$$$$.",
484
 
                        (char *)NULL);
 
449
                        SVN_VA_NULL);
485
450
          expect[52 - 1] =
486
451
            apr_pstrcat(pool, "Line 52: ",
487
452
                        "same, with expanded, empty keyword ",
488
453
                        "$$$$$$Date: ", date, " $$$$$$.",
489
 
                        (char *)NULL);
 
454
                        SVN_VA_NULL);
490
455
        }
491
456
      else  /* unexpand */
492
457
        {
511
476
                        "Valid $LastChangedBy: ",
512
477
                        author,
513
478
                        " $, started unexpanded.",
514
 
                        (char *)NULL);
 
479
                        SVN_VA_NULL);
515
480
          expect[9 - 1] =
516
481
            apr_pstrcat(pool, "Line 9: ",
517
482
                        "Valid $Author: ", author, " $, started unexpanded.",
518
 
                        (char *)NULL);
 
483
                        SVN_VA_NULL);
519
484
          expect[37 - 1] =
520
485
            apr_pstrcat(pool, "Line 37: ",
521
486
                        "Valid $LastChangedBy: ", author,
522
 
                        " $, started expanded.", (char *)NULL);
 
487
                        " $, started expanded.", SVN_VA_NULL);
523
488
          expect[38 - 1] =
524
489
            apr_pstrcat(pool, "Line 38: ",
525
490
                        "Valid $Author: ", author, " $, started expanded.",
526
 
                        (char *)NULL);
 
491
                        SVN_VA_NULL);
527
492
          expect[46 - 1] =
528
493
            apr_pstrcat(pool, "Line 46: ",
529
494
                        "Empty $Author: ", author, " $, started expanded.",
530
 
                        (char *)NULL);
 
495
                        SVN_VA_NULL);
531
496
          expect[71 - 1] =
532
 
            apr_pstrcat(pool, ".$veR$Author: ", author, " $", (char *)NULL);
 
497
            apr_pstrcat(pool, ".$veR$Author: ", author, " $", SVN_VA_NULL);
533
498
 
534
499
          expect[74 - 1] =
535
500
            apr_pstrcat(pool, "Line 74: ",
536
501
                        "Valid $Author: ", author, " $, started expanded.",
537
 
                        (char *)NULL);
 
502
                        SVN_VA_NULL);
538
503
          expect[79 - 1] =
539
504
            apr_pstrcat(pool, "Line 79: ",
540
505
                        "Valid $Author: ", author, " $, started expanded.",
541
 
                        (char *)NULL);
 
506
                        SVN_VA_NULL);
542
507
          expect[80 - 1] =
543
508
            apr_pstrcat(pool, "Line 80: ",
544
509
                        "Valid $Author: ", author, " $, started expanded.",
545
 
                        (char *)NULL);
 
510
                        SVN_VA_NULL);
546
511
          expect[81 - 1] =
547
512
            apr_pstrcat(pool, "Line 81: ",
548
513
                        "Valid $Author: ", author, " $, started expanded.",
549
 
                        (char *)NULL);
 
514
                        SVN_VA_NULL);
550
515
          expect[82 - 1] =
551
516
            apr_pstrcat(pool, "Line 82: ",
552
517
                        "Valid $Author: ", author, " $, started expanded.",
553
 
                        (char *)NULL);
 
518
                        SVN_VA_NULL);
554
519
        }
555
520
      else  /* unexpand */
556
521
        {
581
546
          expect[16 - 1] =
582
547
            apr_pstrcat(pool, "Line 16: ",
583
548
                        "Valid $HeadURL: ", url, " $, started unexpanded.",
584
 
                        (char *)NULL);
 
549
                        SVN_VA_NULL);
585
550
          expect[17 - 1] =
586
551
            apr_pstrcat(pool, "Line 17: ",
587
552
                        "Valid $URL: ", url, " $, started unexpanded.",
588
 
                        (char *)NULL);
 
553
                        SVN_VA_NULL);
589
554
          expect[41 - 1] =
590
555
            apr_pstrcat(pool, "Line 41: ",
591
556
                        "Valid $HeadURL: ", url, " $, started expanded.",
592
 
                        (char *)NULL);
 
557
                        SVN_VA_NULL);
593
558
          expect[42 - 1] =
594
559
            apr_pstrcat(pool, "Line 42: ",
595
560
                        "Valid $URL: ", url, " $, started expanded.",
596
 
                        (char *)NULL);
 
561
                        SVN_VA_NULL);
597
562
          expect[75 - 1] =
598
563
            apr_pstrcat(pool, "Line 75: ",
599
564
                        "Valid $URL: ", url, " $, started expanded.",
600
 
                        (char *)NULL);
 
565
                        SVN_VA_NULL);
601
566
        }
602
567
      else  /* unexpand */
603
568
        {
622
587
                        "Two keywords back to back: "
623
588
                        "$Author: ", author, " $"
624
589
                        "$Rev: ", rev, " $.",
625
 
                        (char *)NULL);
 
590
                        SVN_VA_NULL);
626
591
          expect[49 - 1] =
627
592
            apr_pstrcat(pool, "Line 49: ",
628
593
                        "One keyword, one not, back to back: "
629
594
                        "$Author: ", author, " $Rev$.",
630
 
                        (char *)NULL);
 
595
                        SVN_VA_NULL);
631
596
          expect[70 - 1] =
632
 
            apr_pstrcat(pool, "$Author: ", author, " $Rev$.", (char *)NULL);
 
597
            apr_pstrcat(pool, "$Author: ", author, " $Rev$.", SVN_VA_NULL);
633
598
        }
634
599
      /* Else Lines 48, 49, and 70 remain unchanged. */
635
600
    }
641
606
            apr_pstrcat(pool, "Line 48: ",
642
607
                        "Two keywords back to back: "
643
608
                        "$Author$$Rev: ", rev, " $.",
644
 
                        (char *)NULL);
 
609
                        SVN_VA_NULL);
645
610
          expect[49 - 1] =
646
611
            apr_pstrcat(pool, "Line 49: ",
647
612
                        "One keyword, one not, back to back: "
648
613
                        "$Author$Rev: ", rev, " $.",
649
 
                        (char *)NULL);
 
614
                        SVN_VA_NULL);
650
615
          expect[70 - 1] =
651
 
            apr_pstrcat(pool, "$Author$Rev: ", rev, " $.", (char *)NULL);
 
616
            apr_pstrcat(pool, "$Author$Rev: ", rev, " $.", SVN_VA_NULL);
652
617
        }
653
618
      /* Else Lines 48, 49, and 70 remain unchanged. */
654
619
    }
660
625
            apr_pstrcat(pool, "Line 48: ",
661
626
                        "Two keywords back to back: "
662
627
                        "$Author: ", author, " $$Rev$.",
663
 
                        (char *)NULL);
 
628
                        SVN_VA_NULL);
664
629
          expect[49 - 1] =
665
630
            apr_pstrcat(pool, "Line 49: ",
666
631
                        "One keyword, one not, back to back: "
667
632
                        "$Author: ", author, " $Rev$.",
668
 
                        (char *)NULL);
 
633
                        SVN_VA_NULL);
669
634
          expect[70 - 1] =
670
 
            apr_pstrcat(pool, "$Author: ", author, " $Rev$.", (char *)NULL);
 
635
            apr_pstrcat(pool, "$Author: ", author, " $Rev$.", SVN_VA_NULL);
671
636
        }
672
637
      /* Else Lines 48, 49, and 70 remain unchanged. */
673
638
    }
684
649
                        "keyword in a keyword: $Author: ",
685
650
                        author,
686
651
                        " $Date$ $",
687
 
                        (char *)NULL);
 
652
                        SVN_VA_NULL);
688
653
        }
689
654
      else  /* unexpand */
690
655
        {
691
656
          expect[24 - 1] =
692
657
            apr_pstrcat(pool, "Line 24: ",
693
658
                        "keyword in a keyword: $Author$Date$ $",
694
 
                        (char *)NULL);
 
659
                        SVN_VA_NULL);
695
660
        }
696
661
    }
697
662
  else if (date && (! author))
703
668
                        "keyword in a keyword: $Author: $Date: ",
704
669
                        date,
705
670
                        " $ $",
706
 
                        (char *)NULL);
 
671
                        SVN_VA_NULL);
707
672
        }
708
673
      /* Else Line 24 remains unchanged. */
709
674
    }
716
681
                        "keyword in a keyword: $Author: ",
717
682
                        author,
718
683
                        " $Date$ $",
719
 
                        (char *)NULL);
 
684
                        SVN_VA_NULL);
720
685
        }
721
686
      else  /* unexpand */
722
687
        {
723
688
          expect[24 - 1] =
724
689
            apr_pstrcat(pool, "Line 24: ",
725
690
                        "keyword in a keyword: $Author$Date$ $",
726
 
                        (char *)NULL);
 
691
                        SVN_VA_NULL);
727
692
        }
728
693
    }
729
694
  /* Else neither author nor date, so Line 24 remains unchanged. */
769
734
    }
770
735
 
771
736
  /* Clean up this test, since successful. */
772
 
  SVN_ERR(remove_file(src_fname, pool));
773
 
  SVN_ERR(remove_file(dst_fname, pool));
 
737
  SVN_ERR(svn_io_remove_file2(src_fname, FALSE, pool));
 
738
  SVN_ERR(svn_io_remove_file2(dst_fname, FALSE, pool));
774
739
 
775
740
  return SVN_NO_ERROR;
776
741
}
862
827
mixed_to_lf(apr_pool_t *pool)
863
828
{
864
829
  return substitute_and_verify
865
 
          ("cr_to_lf", NULL, "\n", 1, NULL, NULL, NULL, NULL, 1, pool);
 
830
          ("mixed_to_lf", NULL, "\n", 1, NULL, NULL, NULL, NULL, 1, pool);
866
831
}
867
832
 
868
833
 
1096
1061
unexpand_author(apr_pool_t *pool)
1097
1062
{
1098
1063
  SVN_ERR(substitute_and_verify
1099
 
          ("author", "\n", NULL, 0, NULL, NULL, "jrandom", NULL, 0, pool));
 
1064
          ("unexpand_author", "\n", NULL, 0, NULL, NULL, "jrandom", NULL, 0, pool));
1100
1065
 
1101
1066
  SVN_ERR(substitute_and_verify
1102
 
          ("author", "\r\n", NULL, 0, NULL, NULL, "jrandom", NULL, 0, pool));
 
1067
          ("unexpand_author", "\r\n", NULL, 0, NULL, NULL, "jrandom", NULL, 0, pool));
1103
1068
 
1104
1069
  return SVN_NO_ERROR;
1105
1070
}
1109
1074
unexpand_date(apr_pool_t *pool)
1110
1075
{
1111
1076
  SVN_ERR(substitute_and_verify
1112
 
          ("date", "\n", NULL, 0,
 
1077
          ("unexpand_date", "\n", NULL, 0,
1113
1078
           NULL, "Wed Jan  9 07:49:05 2002", NULL, NULL, 0, pool));
1114
1079
 
1115
1080
  SVN_ERR(substitute_and_verify
1116
 
          ("date", "\r\n", NULL, 0,
 
1081
          ("unexpand_date", "\r\n", NULL, 0,
1117
1082
           NULL, "Wed Jan  9 07:49:05 2002", NULL, NULL, 0, pool));
1118
1083
 
1119
1084
  return SVN_NO_ERROR;
1124
1089
unexpand_author_date(apr_pool_t *pool)
1125
1090
{
1126
1091
  SVN_ERR(substitute_and_verify
1127
 
          ("author_date", "\n", NULL, 0,
 
1092
          ("unexpand_author_date", "\n", NULL, 0,
1128
1093
           NULL, "Wed Jan  9 07:49:05 2002", "jrandom", NULL, 0, pool));
1129
1094
 
1130
1095
  SVN_ERR(substitute_and_verify
1131
 
          ("author_date", "\r\n", NULL, 0,
 
1096
          ("unexpand_author_date", "\r\n", NULL, 0,
1132
1097
           NULL, "Wed Jan  9 07:49:05 2002", "jrandom", NULL, 0, pool));
1133
1098
 
1134
1099
  return SVN_NO_ERROR;
1139
1104
unexpand_author_rev(apr_pool_t *pool)
1140
1105
{
1141
1106
  SVN_ERR(substitute_and_verify
1142
 
          ("author_rev", "\n", NULL, 0,
 
1107
          ("unexpand_author_rev", "\n", NULL, 0,
1143
1108
           "1729", NULL, "jrandom", NULL, 0, pool));
1144
1109
 
1145
1110
  SVN_ERR(substitute_and_verify
1146
 
          ("author_rev", "\r\n", NULL, 0,
 
1111
          ("unexpand_author_rev", "\r\n", NULL, 0,
1147
1112
           "1729", NULL, "jrandom", NULL, 0, pool));
1148
1113
 
1149
1114
  return SVN_NO_ERROR;
1154
1119
unexpand_rev(apr_pool_t *pool)
1155
1120
{
1156
1121
  SVN_ERR(substitute_and_verify
1157
 
          ("rev", "\n", NULL, 0,
 
1122
          ("unexpand_rev", "\n", NULL, 0,
1158
1123
           "1729", NULL, NULL, NULL, 0, pool));
1159
1124
 
1160
1125
  SVN_ERR(substitute_and_verify
1161
 
          ("rev", "\r\n", NULL, 0,
 
1126
          ("unexpand_rev", "\r\n", NULL, 0,
1162
1127
           "1729", NULL, NULL, NULL, 0, pool));
1163
1128
 
1164
1129
  return SVN_NO_ERROR;
1169
1134
unexpand_rev_url(apr_pool_t *pool)
1170
1135
{
1171
1136
  SVN_ERR(substitute_and_verify
1172
 
          ("rev_url", "\n", NULL, 0,
 
1137
          ("unexpand_rev_url", "\n", NULL, 0,
1173
1138
           "1729", NULL, NULL, "http://subversion.tigris.org", 0, pool));
1174
1139
 
1175
1140
  SVN_ERR(substitute_and_verify
1176
 
          ("rev_url", "\r\n", NULL, 0,
 
1141
          ("unexpand_rev_url", "\r\n", NULL, 0,
1177
1142
           "1729", NULL, NULL, "http://subversion.tigris.org", 0, pool));
1178
1143
 
1179
1144
  return SVN_NO_ERROR;
1184
1149
unexpand_author_date_rev_url(apr_pool_t *pool)
1185
1150
{
1186
1151
  SVN_ERR(substitute_and_verify
1187
 
          ("author_date_rev_url", "\n", NULL, 0,
 
1152
          ("unexpand_author_date_rev_url", "\n", NULL, 0,
1188
1153
           "1729",
1189
1154
           "Wed Jan  9 07:49:05 2002",
1190
1155
           "jrandom",
1192
1157
           1, pool));
1193
1158
 
1194
1159
  SVN_ERR(substitute_and_verify
1195
 
          ("author_date_rev_url", "\r\n", NULL, 0,
 
1160
          ("unexpand_author_date_rev_url", "\r\n", NULL, 0,
1196
1161
           "1729",
1197
1162
           "Wed Jan  9 07:49:05 2002",
1198
1163
           "jrandom",
1210
1175
lf_to_crlf_unexpand_author(apr_pool_t *pool)
1211
1176
{
1212
1177
  return substitute_and_verify
1213
 
          ("lf_to_crlf_author", "\n", "\r\n", 0,
 
1178
          ("lf_to_crlf_unexpand_author", "\n", "\r\n", 0,
1214
1179
           NULL, NULL, "jrandom", NULL, 0, pool);
1215
1180
}
1216
1181
 
1219
1184
mixed_to_lf_unexpand_author_date(apr_pool_t *pool)
1220
1185
{
1221
1186
  return substitute_and_verify
1222
 
          ("mixed_to_lf_author_date", NULL, "\n", 1,
 
1187
          ("mixed_to_lf_unexpand_author_date", NULL, "\n", 1,
1223
1188
           NULL, "Wed Jan  9 07:49:05 2002", "jrandom", NULL, 0, pool);
1224
1189
}
1225
1190
 
1228
1193
crlf_to_cr_unexpand_author_rev(apr_pool_t *pool)
1229
1194
{
1230
1195
  return substitute_and_verify
1231
 
          ("crlf_to_cr_author_rev", "\r\n", "\r", 0,
 
1196
          ("crlf_to_cr_unexpand_author_rev", "\r\n", "\r", 0,
1232
1197
           "1729", NULL, "jrandom", NULL, 0, pool);
1233
1198
}
1234
1199
 
1237
1202
cr_to_crlf_unexpand_rev(apr_pool_t *pool)
1238
1203
{
1239
1204
  return substitute_and_verify
1240
 
          ("cr_to_crlf_rev", "\r", "\r\n", 0,
 
1205
          ("cr_to_crlf_unexpand_rev", "\r", "\r\n", 0,
1241
1206
           "1729", NULL, NULL, NULL, 0, pool);
1242
1207
}
1243
1208
 
1246
1211
cr_to_crlf_unexpand_rev_url(apr_pool_t *pool)
1247
1212
{
1248
1213
  return substitute_and_verify
1249
 
          ("cr_to_crlf_rev_url", "\r", "\r\n", 0,
 
1214
          ("cr_to_crlf_unexpand_rev_url", "\r", "\r\n", 0,
1250
1215
           "1729", NULL, NULL, "http://subversion.tigris.org", 0, pool);
1251
1216
}
1252
1217
 
1255
1220
mixed_to_crlf_unexpand_author_date_rev_url(apr_pool_t *pool)
1256
1221
{
1257
1222
  return substitute_and_verify
1258
 
          ("mixed_to_crlf_author_date_rev_url", NULL, "\r\n", 1,
 
1223
          ("mixed_to_crlf_unexpand_author_date_rev_url", NULL, "\r\n", 1,
1259
1224
           "1729",
1260
1225
           "Wed Jan  9 07:49:05 2002",
1261
1226
           "jrandom",
1268
1233
 
1269
1234
/* The test table.  */
1270
1235
 
1271
 
struct svn_test_descriptor_t test_funcs[] =
 
1236
static int max_threads = 7;
 
1237
 
 
1238
static struct svn_test_descriptor_t test_funcs[] =
1272
1239
  {
1273
1240
    SVN_TEST_NULL,
1274
1241
  /* The no-op conversion. */
1362
1329
                   "mixed_to_crlf; unexpand author, date, rev, url"),
1363
1330
    SVN_TEST_NULL
1364
1331
  };
 
1332
 
 
1333
SVN_TEST_MAIN