60macro.t 14 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036
  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. ['zero_argument',
  7. '@macro foo {}
  8. in foo
  9. @end macro
  10. @macro abar
  11. in bar
  12. @end macro'],
  13. ['text_before_after',
  14. 'before @macro mymacro
  15. in macro
  16. @end macro after
  17. '],
  18. ['no_macrobody',
  19. '@macro nomacrobody {arg}
  20. @end macro
  21. @nomacrobody line arg
  22. @nomacrobody{arg brace}.
  23. '],
  24. ['empty_macro_no_arg',
  25. '@macro foo
  26. @end macro
  27. @foo
  28. @foo{}
  29. '],
  30. ['empty_macro_in_text_no_arg',
  31. '@macro texnl{}
  32. @end macro
  33. This.@texnl It.
  34. @macro texnltwo
  35. @end macro
  36. This 2 see.@texnltwo A.
  37. '],
  38. ['macro_expands_to_empty',
  39. '@macro foo {arg}
  40. \arg\
  41. @end macro
  42. @foo{}
  43. @foo{aa}
  44. '],
  45. ['empty_end','@macro foo {aaa, }
  46. in foo
  47. @end macro'],
  48. ['bad_argument', '@macro
  49. in macro
  50. @end macro
  51. @rmacro abar aaa
  52. in
  53. @end rmacro
  54. @macro aftername {ggg} more
  55. in macro
  56. @end macro
  57. @macro #badname
  58. in #
  59. @end macro
  60. '],
  61. ['bad_macro_name_with_underscore',
  62. '@macro the_macro {arg1, arg2}
  63. In macro
  64. @end macro
  65. '],
  66. ['macro_name_with_hyphen',
  67. '@macro macro-one {arg-one, arg2}
  68. This \arg-one\ and that \arg2\.
  69. @end macro
  70. @macro-one{blah, @code{bli-bli}}
  71. '],
  72. ['macro_name_with_digit',
  73. '@macro macro1
  74. macro1
  75. @end macro
  76. @macro macro11 {arg}
  77. expand \arg\
  78. @end macro
  79. @macro11 some thing @macro1{}
  80. '],
  81. ['bad_formal_arg',
  82. '
  83. @macro bad { , not_empty}
  84. in bad macro
  85. @end macro
  86. @macro badspace{first, in 2arg}
  87. bad space
  88. @end macro
  89. @macro abar {:::}
  90. in bar
  91. @macro foo {? aaa}
  92. in macro foo
  93. @end macro
  94. @end macro
  95. '],
  96. ['double_macro_definition',
  97. '@macro foo
  98. @end macro
  99. @macro foo
  100. @end macro
  101. '],
  102. ['macro_no_arg_expansion',
  103. '@macro testone
  104. res1
  105. @end macro
  106. @testone{} abc
  107. '],
  108. ['macro_no_arg_bad_expansion',
  109. '@macro testone
  110. res1
  111. @end macro
  112. @testone abc
  113. '],
  114. ['macro_one_arg_end_of_file',
  115. '@macro onearg{arg}
  116. Arg \arg\.
  117. @end macro
  118. @onearg'],
  119. ['too_much_args',
  120. '@macro twoargs {first, second}
  121. first arg: \first\
  122. second arg: \second\
  123. @end macro
  124. @twoargs{one, two, three}.
  125. '],
  126. ['macro_expansion','
  127. @macro macroone {arg1, arg2 }
  128. result of a macro with \arg1\ and
  129. @verbatim
  130. \arg2\
  131. @end verbatim
  132. @end macro
  133. 2 simple args. @macroone {first arg, second arg}.
  134. comma in command. @macroone{aaa @samp{a macro , } bbb}.
  135. call on the line. @macroone my arg.
  136. recursive call. @macroone{first arg, @macroone{nested second arg}}.
  137. protect stuff. @macroone{first \, arg, \{\} \\\\ }.
  138. multi-line arg. @macroone{arg 1
  139. now, arg3
  140. }.'],
  141. ['implicit_quoting_one_arg',
  142. '
  143. @macro FIXME{a}
  144. @strong{FIXME: \a\}
  145. @end macro
  146. @FIXME{Many arguments, separated by commas, are processed here}
  147. '],
  148. ['implicit_quoting_recursion',
  149. '@rmacro cat{a,b}
  150. \a\\\\b\
  151. @end rmacro
  152. @cat{@cat{@cat{@cat{@cat{@cat{na, to}, po}, co}, tu}, oto},tam}
  153. '],
  154. ['arg_not_closed',
  155. '@macro foo {arg}
  156. foo
  157. @end macro
  158. call @foo{ something
  159. '],
  160. ['macro_not_closed',
  161. '@macro name
  162. in macro
  163. '],
  164. ['macro_no_argument',
  165. '@macro'],
  166. ['expand_two_same',
  167. '@macro macrotwo { arg }
  168. With a doubles arg \arg\ and re \arg\
  169. @end macro
  170. Call macro2
  171. @macrotwo { a simple @code{
  172. arg}
  173. }
  174. Call macro2 with 2 args
  175. @macrotwo { arg with comma , here }
  176. '],
  177. ['macro_zero',
  178. '@macro zero
  179. 0
  180. @end macro
  181. Macro
  182. @zero{}
  183. '],
  184. ['protect_in_body',
  185. '@macro macroone { arg1 , arg2 }
  186. result: @emph{\arg1\} protected \\\\ -> \\\\arg1\\\\ @emph{\arg2\}
  187. @end macro
  188. the @macroone { @samp{f\irst arg}, second arg } after macro.
  189. '],
  190. ['protect_in_body_one_arg',
  191. '@macro macroone { arg1 , arg2 }
  192. result: @emph{\arg1\} protected \\\\ -> \\\\arg1\\\\ @emph{\arg2\}
  193. @end macro
  194. @macroone { @samp{f\irst arg}}
  195. '],
  196. ['protect_in_body_line_arg',
  197. '@macro macroone { arg1 , arg2 }
  198. result: @emph{\arg1\} protected \\\\ -> \\\\arg1\\\\ @emph{\arg2\}
  199. @end macro
  200. @macroone @samp{f\irst arg}, second arg
  201. '],
  202. ['backslash_in_arg',
  203. '@node Top
  204. @macro funindex {TEXT}
  205. @findex \TEXT\
  206. @end macro
  207. @funindex \\\\q
  208. @funindex{\\\\r}
  209. @funindex \q
  210. @funindex{\r}
  211. @printindex fn
  212. '],
  213. ['protect_comma_macro_line',
  214. '@macro macrotwo { arg }
  215. we get \arg\ and another \arg\
  216. and another one on another line \arg\
  217. and a last in another paragraph
  218. @end macro
  219. @macrotwo arg, comma \,
  220. '],
  221. ['paragraph_and_macro',
  222. '@macro aempty
  223. @end macro
  224. @macro aspace
  225. @end macro
  226. @macro word
  227. a word
  228. @end macro
  229. @aempty{}
  230. @aempty{}
  231. @aempty{} text after empty.
  232. @aspace{}
  233. @aspace{}
  234. @aspace{} text after space.
  235. '],
  236. ['macro_in_end_argument',
  237. '@macro acartouche
  238. cartouche
  239. @end macro
  240. @cartouche
  241. @end @acartouche{}
  242. '],
  243. ['macro_for_end',
  244. '@macro myend
  245. @end
  246. @end macro
  247. @cartouche
  248. @myend{} cartouche
  249. '],
  250. ['complete_macro_for_end',
  251. '@macro theend
  252. @end cartouche
  253. @end macro
  254. @cartouche
  255. @theend{}'],
  256. ['space_macro_after_end',
  257. '@macro spaces
  258. @end macro
  259. @html
  260. in html
  261. @end html @spaces{}'],
  262. ['space_macro_after_end_verbatim',
  263. '@macro spaces
  264. @end macro
  265. @verbatim
  266. in verbatim
  267. @end verbatim @spaces{}'],
  268. ['macro_in_menu',
  269. '
  270. @macro astar
  271. *
  272. @end macro
  273. @macro starspaces
  274. *
  275. @end macro
  276. @macro spaces
  277. @end macro
  278. @macro aspace
  279. @end macro
  280. @macro twocolon
  281. ::
  282. @end macro
  283. @macro acolon
  284. :
  285. @end macro
  286. @menu
  287. @starspaces{}menu entry@twocolon{} description
  288. @spaces{}
  289. menu comment
  290. @astar{} node::
  291. @astar{}@aspace{}other node::
  292. * node colon macro@acolon{}@acolon{}@aspace{}description
  293. * 3rd node: entry.@aspace{}description
  294. @end menu
  295. '],
  296. ['macro_in_accent',
  297. '@macro aletter
  298. a
  299. @end macro
  300. @macro aspace
  301. @end macro
  302. @ringaccent @aletter{}.
  303. @ringaccent@aletter{}.
  304. @~@aletter{}.
  305. @~{@aletter{}}.
  306. @ringaccent@aspace{}@aletter{}.
  307. '],
  308. ['macro_for_ignored_line_command',
  309. '@macro pagemacro
  310. @page
  311. @end macro
  312. @pagemacro{} on the line
  313. '],
  314. ['nested_macro_call',
  315. '@macro machin{}
  316. (machin)
  317. @end macro
  318. @macro truc{}
  319. @machin{}
  320. @end macro
  321. Before @truc{} after truc.
  322. '],
  323. ['two_macros_on_a_line',
  324. '@macro mymacro
  325. in mymacro
  326. @end macro
  327. @macro mymacrowithargs{arg}
  328. in with args
  329. now the arg \arg\
  330. after
  331. @end macro
  332. @@mymacro@{@} @@mymacro@{@}
  333. @mymacro{} @mymacro{}
  334. @@mymacro @@mymacro@{@}
  335. @mymacro @mymacro{}
  336. @@mymacro@{@} @@mymacro
  337. @mymacro{} @mymacro
  338. with args
  339. @mymacrowithargs {an
  340. arg
  341. in macro} @mymacro{}
  342. '],
  343. ['simple_imbricated_macro',
  344. '@macro truc {}
  345. truc.
  346. @macro bidule {}
  347. bidule.
  348. @end macro
  349. @end macro
  350. @truc{}
  351. @bidule{}
  352. '],
  353. ['macro_in_macro_arg','
  354. @macro macroone
  355. a, @macrotwo
  356. @end macro
  357. @macro macrotwo{arg}
  358. hello \arg\ after arg
  359. @end macro
  360. @macro macrothree{text, arg}
  361. \text\
  362. &&&& \arg\
  363. @end macro
  364. @macrothree{@macroone{}text for macro2}
  365. '],
  366. ['macro_in_macro_arg_simpler',
  367. '@macro macrooneone
  368. a, macro2
  369. @end macro
  370. @macro macrothree{text, arg}
  371. \text\
  372. &&&& \arg\
  373. @end macro
  374. @macrothree{@macrooneone{}text for macro2}
  375. '],
  376. ['macro_in_brace_command',
  377. '@macro foo
  378. foo-expansion
  379. @end macro
  380. @macro abar
  381. bar-expansion
  382. @end macro
  383. @itemize @bullet
  384. @item @email{@foo{}@@@abar{}},
  385. also helped.
  386. @end itemize
  387. '],
  388. ['complex_argument',
  389. '@macro macrotwo{arg}
  390. coucou \arg\ after arg
  391. @end macro
  392. @macro macrofour {}
  393. 1
  394. 2
  395. 3
  396. 4
  397. @end macro
  398. @macro macrothree{text, arg}
  399. \text\
  400. &&&& \arg\
  401. @end macro
  402. @macrothree{@verb{% @macrotwo %}
  403. @c @macrofour
  404. @pagesizes 4 @macrofour{}
  405. @headings doubleafter @macrofour{}
  406. @verbatim
  407. @macrotwo
  408. @end verbatim
  409. @ignore
  410. @macrofour
  411. @end ignore
  412. @macro macroseven {truc}
  413. @emph{\\\\truc\\\\}
  414. @end macro
  415. macroseven defined
  416. @ifinfo
  417. @macrofour
  418. @end ifinfo
  419. @iftex
  420. @macrotwo{aa\,bb}
  421. @end iftex
  422. @macrofour{}
  423. }
  424. Call macroseven
  425. @macroseven{aaa}
  426. ',
  427. {'expanded_formats' => []}
  428. ],
  429. ['expansion_order',
  430. '@macro bidule{arg}
  431. @machin{}
  432. @end macro
  433. @macro machin
  434. \\\\arg\\\\
  435. @end macro
  436. @bidule{ab}
  437. '],
  438. ['ifclear_in_macro',
  439. '@macro note {arg}
  440. @ifclear notes
  441. \arg\
  442. @end ifclear
  443. @end macro
  444. @note{
  445. arg
  446. }
  447. '],
  448. ['macro_in_ifset',
  449. '@macro macroone {arg}
  450. @end ifset
  451. @end macro
  452. @ifset a
  453. @macroone
  454. in ifset
  455. @end ifset
  456. '],
  457. ['macro_in_ifset_end_in_arg',
  458. '@macro macroone {arg}
  459. @end ifset
  460. @end macro
  461. @ifset a
  462. @macroone{
  463. @end ifset
  464. }
  465. in ifset
  466. @end ifset
  467. '],
  468. ['ifset_in_macro',
  469. '@macro note {arg}
  470. @ifset notes
  471. \arg\
  472. @end ifset
  473. @end macro
  474. @note{
  475. arg
  476. }
  477. '],
  478. ['ifset_in_macro_set',
  479. '@macro note {arg}
  480. @ifset notes
  481. \arg\
  482. @end ifset
  483. @end macro
  484. @note{
  485. arg
  486. }
  487. ', {'values' => {'notes' => 1}}],
  488. ['ifset_and_end_isef_in_macro',
  489. '@macro beginifset {}
  490. @ifset a
  491. @end macro
  492. @macro endifset {}
  493. @end ifset
  494. @end macro
  495. @beginifset
  496. in ifset
  497. @endifset
  498. '],
  499. # unmacro is required for C makeinfo to avoid a warning.
  500. # texi2dvi breaks.
  501. ['arg_body_expansion_order',
  502. '
  503. @macro othermacro
  504. initial
  505. @end macro
  506. @macro redefineothermacro {arg}
  507. @unmacro othermacro
  508. @macro othermacro
  509. different
  510. @end macro
  511. \arg\
  512. @end macro
  513. @redefineothermacro{@othermacro{}}
  514. '],
  515. ['macro_in_index_commands',
  516. '@macro cp
  517. cp
  518. @end macro
  519. @macro fn
  520. fn
  521. @end macro
  522. @macro syncodeindexcommand
  523. @syncodeindex
  524. @end macro
  525. @syncodeindex @cp{} @fn{}
  526. @syncodeindexcommand{} cp fn
  527. @macro truc
  528. truc
  529. @end macro
  530. definedx truc
  531. @defindex @truc{}
  532. after
  533. @macro trucindexcommand
  534. @trucindex
  535. @end macro
  536. @macro codeidx
  537. codeidx
  538. @end macro
  539. @defcodeindex @codeidx{}
  540. @macro defcodeindexentry
  541. a @var{index entry} t@\'e @^{@dotless{i}}
  542. @end macro
  543. @node Top
  544. @trucindexcommand{} index truc
  545. @codeidxindex @defcodeindexentry{}
  546. @kindex @truc{} kindex
  547. @pindex pindex @codeidx{}
  548. macro truc
  549. @printindex @truc{}
  550. macro cp
  551. @printindex @cp{}
  552. '],
  553. ['macro_in_invalid_documentencoding',
  554. '@macro badmacro
  555. badm
  556. @end macro
  557. @documentencoding @badmacro{}
  558. '],
  559. ['macro_in_misc_commands',
  560. '@macro text
  561. atext
  562. @end macro
  563. @macro Top
  564. Top
  565. @end macro
  566. @node @Top{}
  567. @top top @text{}
  568. @subheading Comment like: @text{}
  569. Text line followed by a comment on the same line and another below @c comment @text{}
  570. @c comment @text{}
  571. @macro en
  572. en
  573. @end macro
  574. @macro documentlanguagecommand
  575. @documentlanguage
  576. @end macro
  577. documentlanguage @documentlanguage @en{}
  578. documentlanguage on its line
  579. @documentlanguagecommand{} en
  580. line following documentlanguage
  581. @macro pagesizesarg
  582. 200mm,150mm
  583. @end macro
  584. @macro afourpapermacro
  585. @afourpaper
  586. @end macro
  587. @pagesizes @pagesizesarg{}
  588. @afourpapermacro{}
  589. @headings on line following headings @text{}
  590. @oddfooting some text ignored @text{}
  591. @everyheading on line following everyheading @text{}
  592. @macro needarg
  593. 0.1
  594. @end macro
  595. @need @needarg{}
  596. @macro raisesectionsmacro
  597. @raisesections
  598. @end macro
  599. @raisesectionsmacro{}
  600. @macro lowersectionsmacro
  601. @lowersections
  602. @end macro
  603. @lowersectionsmacro{}
  604. @@definfoenclose phoo,//,\\\\ @definfoenclose phoo,//,\\\\
  605. @phoo{bar}
  606. @macro definfoenclosename
  607. phi
  608. @end macro
  609. @definfoenclose @definfoenclosename{},:,:
  610. @phi{bar}
  611. @macro strongmacro
  612. @strong
  613. @end macro
  614. @macro strongname
  615. strong
  616. @end macro
  617. @strongmacro{}{very strong}
  618. @definfoenclose @strongname{},(@strongname{}:,:)
  619. @strongmacro{}{ is it really strong? }
  620. @kbd{something before kbdinputstyle}
  621. @macro kbdinputstylearg
  622. code
  623. @end macro
  624. @kbdinputstyle @kbdinputstylearg{}
  625. @kbd{truc}
  626. @example
  627. @kbd{example}
  628. @end example
  629. @macro asisarg
  630. asis
  631. @end macro
  632. @macro zero
  633. 0
  634. @end macro
  635. @macro nonearg
  636. none
  637. @end macro
  638. @macro four
  639. 4
  640. @end macro
  641. @macro six
  642. 6
  643. @end macro
  644. @paragraphindent @asisarg{}
  645. @paragraphindent @zero{}
  646. @paragraphindent @nonearg{}
  647. @paragraphindent @four{}
  648. @firstparagraphindent @nonearg{}
  649. @exampleindent @six{}
  650. @macro endarg
  651. end
  652. @end macro
  653. @macro separatearg
  654. separate
  655. @end macro
  656. @footnotestyle @endarg{}
  657. @footnotestyle @separatearg{}
  658. @macro onarg
  659. on
  660. @end macro
  661. @macro offarg
  662. off
  663. @end macro
  664. @frenchspacing @onarg{}
  665. @frenchspacing @offarg{}
  666. @c accepts 10 or 11
  667. @macro ten
  668. 10
  669. @end macro
  670. @fonttextsize @ten{}
  671. @c accept false or true
  672. @macro falsearg
  673. false
  674. @end macro
  675. @macro truearg
  676. true
  677. @end macro
  678. @allowcodebreaks @falsearg{}
  679. @allowcodebreaks @truearg{}
  680. @macro pagemacro
  681. @page
  682. @end macro
  683. @macro noindentmacro
  684. @noindent
  685. @end macro
  686. @macro refillmacro
  687. @refill
  688. @end macro
  689. @@page @pagemacro{} on page line
  690. @@noindent @noindentmacro{} @@refill @refillmacro{} something
  691. @noindentmacro{} noindent at beginning of line
  692. @noindentmacro{}
  693. noindent on the preceding line
  694. @noindentmacro{} noindent after space at beginning of line
  695. @pagemacro{} page at beginning of line
  696. @pagemacro{}
  697. After page on its own line.
  698. @@page @pagemacro{}
  699. two spaces @@noindent @noindentmacro{} @@refill @refillmacro{}
  700. @macro contentsmacro
  701. @contents
  702. @end macro
  703. @contentsmacro{}
  704. @vskip @atext{}
  705. @macro cropmarksmacro
  706. @cropmarks
  707. @end macro
  708. @cropmarksmacro{}
  709. @macro exdentmacro
  710. @exdent
  711. @end macro
  712. @exdentmacro{} line after exdent
  713. @macro two
  714. 2
  715. @end macro
  716. @sp @two{}
  717. @macro resultmacro
  718. @result
  719. @end macro
  720. @clickstyle @resultmacro{}
  721. @menu
  722. * node @text{}::
  723. @end menu
  724. @node node @text{}
  725. @chapter chapter
  726. @contentsmacro{}
  727. @macro shortcontentsmacro
  728. @shortcontents
  729. @end macro
  730. @shortcontentsmacro{}
  731. @macro byemacro
  732. @bye
  733. @end macro
  734. @byemacro{}
  735. '],
  736. # this does not lead to a recursive call with the current implementation
  737. ['recursive_call_in_argument',
  738. '@macro anorecurse{arg}
  739. a
  740. @end macro
  741. @anorecurse{@anorecurse{}}
  742. '],
  743. ['recursive_call_in_macro',
  744. '@macro anorecurse{arg}
  745. @anorecurse{arg}
  746. @end macro
  747. @anorecurse{}
  748. '],
  749. ['double_recursive_macro_call',
  750. '
  751. @macro macone {arg}
  752. @mactwo{}
  753. @end macro
  754. @macro mactwo{arg}
  755. @macone{}
  756. @end macro
  757. @mactwo{}
  758. '],
  759. ['unknown_macro_on_line_command',
  760. '@setfilename @begin{}file'
  761. ],
  762. ['macro_with_error_at_end_line_after_macro',
  763. '@macro witherror{string}
  764. @center
  765. @end macro
  766. @witherror{aaa}
  767. '],
  768. ['redefine_texinfo_macro',
  769. '@macro code{arg}
  770. @emph{\arg\}
  771. @end macro
  772. @code{code}
  773. '],
  774. ['leading_spaces_no_ignore',
  775. '@macro mymacro
  776. Some here
  777. text
  778. @end macro
  779. @mymacro{}
  780. '],
  781. ['form_feeds',
  782. '@macro mymacro{a, b}
  783. f \a\ n \b\
  784. @end macro
  785. @macro oneargmacro{c}
  786. g \c\ v
  787. @end macro
  788. @mymacro { arg1 , arg2}
  789. @oneargmacro a@{rgline
  790. '
  791. ],
  792. ['ignored_macro_definition',
  793. '@macro mymacro{}
  794. outside
  795. @end macro
  796. @inlinefmt{tex,
  797. @unmacro mymacro
  798. @macro mymacro{}
  799. in inlinefmt tex
  800. @end macro
  801. }
  802. @mymacro{}.
  803. ']
  804. );
  805. my @todo =(
  806. ['glossary',
  807. '@macro glossarytext
  808. @table @asis
  809. @end macro
  810. @macro glossary
  811. @glossarytext{}
  812. @end table
  813. @end macro
  814. @macro gentry {id, name, text}
  815. @ifhtml
  816. @ref{\id\,\name\}
  817. @end ifhtml
  818. @ifnothtml
  819. \name\ (@pxref{\id\})
  820. @end ifnothtml
  821. @unmacro expandglossary
  822. @macro expandglossary{glossary}
  823. @unmacro glossarytext
  824. @macro glossarytext
  825. \\\\glossary\\\\
  826. @item \name\ @anchor{\id\}
  827. \text\
  828. @end macro
  829. @end macro
  830. @expandglossary {@glossarytext{}}
  831. @end macro
  832. The @gentry{id1, name1, text1\, arg1 } is used in many cases while
  833. @gentry{id2, name2, text2} is quite specific
  834. @glossary{}
  835. ']
  836. );
  837. our ($arg_test_case, $arg_generate, $arg_debug);
  838. run_all ('macro', \@test_cases, $arg_test_case,
  839. $arg_generate, $arg_debug);