/test/macro/syntax.t2t
Unknown | 46 lines | 39 code | 7 blank | 0 comment | 0 complexity | a62da2cb5aab5cdf151612a93a3f9274 MD5 | raw file
1 2%!encoding: UTF-8 3%!preproc: '^%%% ' '' 4BODYINIT 5 6%%% Syntax: Macro without formatting string 7Date : %%date - %%date() 8Mtime : %%mtime - %%mtime() 9Infile : %%infile - %%infile() 10Currentfile : %%currentfile - %%currentfile() 11Outfile : %%outfile - %%outfile() 12 13%%% Syntax: Macro name is case insensitive 14Date : %%dAtE 15Mtime : %%mTiMe 16Infile : %%iNfIlE 17Currentfile : %%cUrReNtFiLe 18Outfile : %%oUtFiLe 19 20%%% Syntax: Macro with formatting string 21Date : %%date(txt %C txt) 22Mtime : %%mtime(txt %C txt) 23Infile : %%infile(txt %e txt) 24Currentfile : %%currentfile(txt %e txt) 25Outfile : %%outfile(txt %e txt) 26 27%%% Syntax: Leading and trailing spaces are preserved 28Date : (%%date( txt )) - (%%date( %C )) 29Mtime : (%%mtime( txt )) - (%%mtime( %C )) 30Infile : (%%infile( txt )) - (%%infile( %e )) 31Currentfile : (%%currentfile( txt )) - (%%currentfile( %e )) 32Outfile : (%%outfile( txt )) - (%%outfile( %e )) 33 34%%% Test: Expansion of the percent char 35Date : %%date(%) - %%date(%%) - %%date(%%%) - %%date(%%%%) 36Mtime : %%mtime(%) - %%mtime(%%) - %%mtime(%%%) - %%mtime(%%%%) 37Infile : %%infile(%) - %%infile(%%) - %%infile(%%%) - %%infile(%%%%) 38Currentfile : %%currentfile(%) - %%currentfile(%%) - %%currentfile(%%%) - %%currentfile(%%%%) 39Outfile : %%outfile(%) - %%outfile(%%) - %%outfile(%%%) - %%outfile(%%%%) 40 41%%% Test: Various per line, glued 42Date : %%date(%C)%%date%%date 43Mtime : %%mtime(%C)%%mtime%%mtime 44Infile : %%infile(%e)%%infile%%infile 45Currentfile : %%currentfile(%e)%%currentfile%%currentfile 46Outfile : %%outfile(%e)%%outfile%%outfile