58alias.t 733 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. ['simple',
  7. '@alias myalias = code
  8. @alias o-theralias=verb @c comment
  9. Should be code: @myalias{code}
  10. Should be verb: @o-theralias{!verb!}
  11. '],
  12. ['alias_table_command',
  13. '@alias myalias = code
  14. @table @myalias
  15. @item table item (code)
  16. @end table
  17. '],
  18. ['bad_line',
  19. '
  20. @alias garbage-on-line =cmd garbage
  21. @alias garbage-on-line =cmd @code{in code}
  22. '],
  23. ['block_command_alias',
  24. '@alias lang=lisp
  25. @lang
  26. in lang
  27. @end lang
  28. '],
  29. );
  30. our ($arg_test_case, $arg_generate, $arg_debug);
  31. run_all ('alias', \@test_cases, $arg_test_case,
  32. $arg_generate, $arg_debug);