181quotation.t 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. use strict;
  2. use File::Spec;
  3. BEGIN { if (defined($ENV{'top_srcdir'})) {unshift @INC, File::Spec->catdir($ENV{'top_srcdir'}, 'tp');} }
  4. require 't/test_utils.pl';
  5. my @test_cases = (
  6. ['quotation_and_author',
  7. '@quotation
  8. @author Some One
  9. A quot---ation
  10. @end quotation
  11. @smallquotation
  12. @author An Author Name
  13. in small---quotation.
  14. @end smallquotation
  15. @quotation Note
  16. @author Some Notifier
  17. A Note
  18. @end quotation
  19. '],
  20. ['quotation_author_in_example',
  21. '@example
  22. @quotation
  23. @author Some One
  24. A quot---ation
  25. @end quotation
  26. @end example
  27. '],
  28. ['space_at_commands_end_quotation_line',
  29. '
  30. @quotation @@ at the end of line @
  31. A @@ at the end of the @@quotation line.
  32. @end quotation
  33. @quotation @@@ at the end of line @
  34. A @@@ at the end of the @@quotation line.
  35. @end quotation
  36. '],
  37. ['empty_quotation',
  38. '@quotation
  39. @end quotation
  40. @quotation Empty
  41. @end quotation
  42. @quotation @asis{}
  43. @end quotation
  44. @quotation @*
  45. @end quotation
  46. '],
  47. ['standard_quotations',
  48. '@quotation Note
  49. A Note
  50. @end quotation
  51. @quotation note
  52. A note
  53. @end quotation
  54. @quotation Caution
  55. Caution
  56. @end quotation
  57. @quotation Important
  58. Important
  59. @end quotation
  60. @quotation Tip
  61. a Tip
  62. @end quotation
  63. @quotation Warning
  64. a Warning.
  65. @end quotation
  66. '],
  67. ['comment_on_quotation_line',
  68. '@quotation truc@ @c quotation
  69. In quotation
  70. @end quotation
  71. '],
  72. ['only_comment_on_quotation_line',
  73. '@quotation @c comment
  74. In quotation
  75. @end quotation
  76. '],
  77. ['quotation_beginning_and_end_on_line',
  78. '@quotation in quotation @end quotation
  79. '],
  80. );
  81. our ($arg_test_case, $arg_generate, $arg_debug);
  82. foreach my $test (@test_cases) {
  83. push @{$test->[2]->{'test_formats'}}, 'plaintext';
  84. push @{$test->[2]->{'test_formats'}}, 'html_text';
  85. push @{$test->[2]->{'test_formats'}}, 'xml';
  86. push @{$test->[2]->{'test_formats'}}, 'docbook';
  87. }
  88. run_all ('quotation', \@test_cases, $arg_test_case,
  89. $arg_generate, $arg_debug);