📄 test.pm
字号:
# -*-perl-*-package Test;require 5.002;use strict;# Tell head to accept old-style options like `-1'.$Test::env_default = ['_POSIX2_VERSION=199209'];my @tv = (# -b option is no longer an official option. But it's still working to# get a downward compatibility. Now (version 1.19m or newer) -COLUMN# only is equivalent to -b -COLUMN.## test_name options input-file-name(s) expected-output-group-file-name# expected-return-code# -------------------------------------------------------------------------# Following tests with "FF set" don't contain a complete set of all# combinations of options and FF-arrangements## One FF at start of file (one empty page)['1a', '', [\'0Ft'], [\'0F'], 0],['1b', '', [\'0Fnt'], [\'0F'], 0],['1c', '+3', [\'0Ft'], [\'3-0F'], 0],['1d', '+3 -f', [\'0Ft'], [\'3f-0F'], 0],['1e', '-a -3', [\'0Ft'], [\'a3-0F'], 0],['1f', '-a -3 -f', [\'0Ft'], [\'a3f-0F'], 0],['1g', '-a -3 -f', [\'0Fnt'], [\'a3f-0F'], 0],['1h', '+3 -a -3 -f', [\'0Ft'], [\'3a3f-0F'], 0],['1i', '-b -3', [\'0Ft'], [\'b3-0F'], 0],['1j', '-b -3 -f', [\'0Ft'], [\'b3f-0F'], 0],['1k', '-b -3 -f', [\'0Fnt'], [\'b3f-0F'], 0],['1l', '+3 -b -3 -f', [\'0Ft'], [\'3b3f-0F'], 0],# Two FF at start of file (two empty page)['2a', '', [\'0FFt'], [\'0FF'], 0],['2b', '', [\'0FnFnt'], [\'0FF'], 0],['2c', '-a -3 -f', [\'0FFt'], [\'a3f-0FF'], 0],['2d', '-a -3 -f', [\'0FFnt'], [\'a3f-0FF'], 0],['2e', '-b -3 -f', [\'0FFt'], [\'b3f-0FF'], 0],['2f', '-b -3 -f', [\'0FFnt'], [\'b3f-0FF'], 0],['2g', '-b -3 -f', [\'0FnFt'], [\'b3f-0FF'], 0],['2h', '-b -3 -f', [\'0FnFnt'], [\'b3f-0FF'], 0],['2i', '+3 -b -3 -f', [\'0FFt'], [\'3b3f-0FF'], 0],['2j', '+3 -b -3 -f', [\'0FFnt'], [\'3b3f-0FF'], 0],## FFs in text (none / one / two empty page(s))['3a', '', [\'FFn'], [\'FF'], 0],['3b', '', [\'FnFn'], [\'FF'], 0],['3c', '+3', [\'FFn'], [\'3-FF'], 0],['3d', '+3 -f', [\'FFn'], [\'3f-FF'], 0],['3e', '-a -3 -f', [\'FFn'], [\'a3f-FF'], 0],['3f', '-a -3 -f', [\'FFtn'], [\'a3f-FF'], 0],['3g', '-b -3 -f', [\'FFn'], [\'b3f-FF'], 0],['3h', '-b -3 -f', [\'FFtn'], [\'b3f-FF'], 0],['3i', '-b -3 -f', [\'FnFn'], [\'b3f-FF'], 0],['3j', '-b -3 -f', [\'tFFn'], [\'b3f-FF'], 0],['3k', '-b -3 -f', [\'tFnFt'], [\'b3f-FF'], 0],['3l', '+3 -b -3 -f', [\'FFn'], [\'3b3f-FF'], 0],['3m', '+3 -b -3 -f', [\'FFtn'], [\'3b3f-FF'], 0],# A full page printed (lines_left_on_page = 0) without a FF found.# Avoid an extra empty page if a FF follows in the next input line.['3la', '-l 24', [\'FFn'], [\'l24-FF'], 0],['3lb', '-l 24', [\'FFtn'], [\'l24-FF'], 0],['3lc', '-l 24', [\'FnFn'], [\'l24-FF'], 0],['3ld', '-l 24', [\'tFFn'], [\'l24-FF'], 0],['3le', '-l 24', [\'tFnFt'], [\'l24-FF'], 0],['3lf', '-l 24', [\'tFFt'], [\'l24-FF'], 0],['3aa', '-a -2 -l 17', [\'FFn'], [\'a2l17-FF'], 0],['3ab', '-a -2 -l 17', [\'FFtn'], [\'a2l17-FF'], 0],['3ac', '-a -2 -l 17', [\'FnFn'], [\'a2l17-FF'], 0],['3ad', '-a -2 -l 17', [\'tFFn'], [\'a2l17-FF'], 0],['3ae', '-a -2 -l 17', [\'tFnFt'], [\'a2l17-FF'], 0],['3af', '-a -2 -l 17', [\'tFFt'], [\'a2l17-FF'], 0],['3ag', '-a -2 -l 15', [\'FFn'], [\'a2l15-FF'], 0],['3ah', '-a -2 -l 15', [\'FFtn'], [\'a2l15-FF'], 0],['3ai', '-a -2 -l 15', [\'FnFn'], [\'a2l15-FF'], 0],['3aj', '-a -2 -l 15', [\'tFFn'], [\'a2l15-FF'], 0],['3ak', '-a -2 -l 15', [\'tFnFt'], [\'a2l15-FF'], 0],['3ba', '-b -2 -l 17', [\'FFn'], [\'b2l17-FF'], 0],['3bb', '-b -2 -l 17', [\'FFtn'], [\'b2l17-FF'], 0],['3bc', '-b -2 -l 17', [\'FnFn'], [\'b2l17-FF'], 0],['3bd', '-b -2 -l 17', [\'tFFn'], [\'b2l17-FF'], 0],['3be', '-b -2 -l 17', [\'tFnFt'], [\'b2l17-FF'], 0],['3bf', '-b -2 -l 17', [\'tFFt'], [\'b2l17-FF'], 0],['3bg', '-b -2 -l 15', [\'FFn'], [\'b2l15-FF'], 0],['3bh', '-b -2 -l 15', [\'FFtn'], [\'b2l15-FF'], 0],['3bi', '-b -2 -l 15', [\'FnFn'], [\'b2l15-FF'], 0],['3bj', '-b -2 -l 15', [\'tFFn'], [\'b2l15-FF'], 0],['3bk', '-b -2 -l 15', [\'tFnFt'], [\'b2l15-FF'], 0],['3Pa', '+4 -l 24', [\'FFn'], [\'4l24-FF'], 0],['3Pb', '+4 -l 24', [\'FFtn'], [\'4l24-FF'], 0],['3Pc', '+4 -l 24', [\'FnFn'], [\'4l24-FF'], 0],['3Pd', '+4 -l 24', [\'tFFn'], [\'4l24-FF'], 0],['3Pe', '+4 -l 24', [\'tFnFt'], [\'4l24-FF'], 0],['3Pf', '+4 -l 24', [\'tFFt'], [\'4l24-FF'], 0],['3Pg', '+4:7 -l 24', [\'tFFt'], [\'4-7l24-FF'], 0],['3Paa', '+3 -a -2 -l 17', [\'FFn'], [\'3a2l17-FF'], 0],['3Pab', '+3 -a -2 -l 17', [\'FFtn'], [\'3a2l17-FF'], 0],['3Pac', '+3 -a -2 -l 17', [\'FnFn'], [\'3a2l17-FF'], 0],['3Pad', '+3 -a -2 -l 17', [\'tFFn'], [\'3a2l17-FF'], 0],['3Pae', '+3 -a -2 -l 17', [\'tFnFt'], [\'3a2l17-FF'], 0],['3Paf', '+3 -a -2 -l 17', [\'tFFt'], [\'3a2l17-FF'], 0],['3Pba', '+3 -b -2 -l 17', [\'FFn'], [\'3b2l17-FF'], 0],['3Pbb', '+3 -b -2 -l 17', [\'FFtn'], [\'3b2l17-FF'], 0],['3Pbc', '+3 -b -2 -l 17', [\'FnFn'], [\'3b2l17-FF'], 0],['3Pbd', '+3 -b -2 -l 17', [\'tFFn'], [\'3b2l17-FF'], 0],['3Pbe', '+3 -b -2 -l 17', [\'tFnFt'], [\'3b2l17-FF'], 0],['3Pbf', '+3 -b -2 -l 17', [\'tFFt'], [\'3b2l17-FF'], 0],## Without "FF set by hand"['4a', '-l 24', [\'tn'], [\'l24-t'], 0],['4b', '-l 17 -f', [\'tn'], [\'l17f-t'], 0],['4c', '+3 -l 24', [\'tn'], [\'3l24-t'], 0],['4d', '+3 -l 17 -f', [\'tn'], [\'3l17f-t'], 0],['4e', '+3:5 -l 17 -f', [\'tn'], [\'3-5l17f-t'], 0],['4f', '-a -3 -l 15', [\'tn'], [\'a3l15-t'], 0],['4g', '-a -3 -l 8 -f', [\'tn'], [\'a3l8f-t'], 0],['4h', '+3 -a -3 -l 15', [\'tn'], [\'3a3l15-t'], 0],['4i', '+3 -a -3 -l 8 -f', [\'tn'], [\'3a3l8f-t'], 0],['4j', '-b -3 -l 15', [\'tn'], [\'b3l15-t'], 0],['4k', '-b -3 -l 8 -f', [\'tn'], [\'b3l8f-t'], 0],['4l', '+3 -b -3 -l 15', [\'tn'], [\'3b3l15-t'], 0],['4m', '+3 -b -3 -l 8 -f', [\'tn'], [\'3b3l8f-t'], 0],## Merge input files (-m option)['5a', '-m -l 24', [\'tn', \'tn'], [\'ml24-t'], 0],['5b', '-m -l 17 -f', [\'tn', \'tn'], [\'ml17f-t'], 0],['5c', '+3 -m -l 24', [\'tn', \'tn'], [\'3ml24-t'], 0],['5d', '+3 -m -l 17 -f', [\'tn', \'tn'], [\'3ml17f-t'], 0],['5e', '-m -l 17 -f', [\'0Ft', \'0Ft'], [\'ml17f-0F'], 0],['5f', '-m -l 17 -f', [\'0Ft', \'0Fnt'], [\'ml17f-0F'], 0],['5g', '-m -l 17 -f', [\'tn', \'0Ft'], [\'ml17f-t-0F'], 0],# A full page printed (lines_left_on_page = 0) without a FF found.# Avoid an extra empty page if a FF follows in the next input line.['5ma', '-m -l 24', [\'tFFn', \'tFnFt'], [\'ml24-FF'], 0],['5mb', '-m -l 24', [\'tFFn', \'FFn'], [\'ml24-FF'], 0],['5mc', '-m -l 24', [\'tn', \'FFn'], [\'ml24-t-FF'], 0],['5md', '-m -l 20', [\'FFn', \'tn'], [\'ml20-FF-t'], 0],['5Pma', '+3 -m -l 24', [\'FFn', \'FnFn'], [\'3ml24-FF'], 0],['5Pmb', '+3 -m -l 24', [\'tFFn', \'FFn'], [\'3ml24-FF'], 0],['5Pmc', '+3 -m -l 24', [\'tn', \'FFn'], [\'3ml24-t-FF'], 0],## Do not print header and footer but retain "FF set by Hand"# (-t option)['6a', '-t -l 24', [\'tn'], [\'t-t'], 0],['6b', '-t -l 17 -f', [\'tn'], [\'t-t'], 0],['6c', '-t -l 17 -f', [\'tFFt-bl'], [\'t-bl'], 0],['6d', '-t -l 24', [\'0FnFnt'], [\'t-0FF'], 0],['6e', '-t -l 24', [\'FFn'], [\'t-FF'], 0],['6f', '-t -l 24', [\'FnFn'], [\'t-FF'], 0],['6g', '-t -l 17 -f', [\'FFn'], [\'t-FF'], 0],['6aa', '-t -a -3', [\'0FnFnt'], [\'ta3-0FF'], 0],['6ab', '-t -a -3', [\'FFn'], [\'ta3-FF'], 0],['6ac', '-t -a -3 -l 24', [\'FnFn'], [\'ta3-FF'], 0],['6ba', '-t -b -3', [\'0FnFnt'], [\'tb3-0FF'], 0],['6bb', '-t -b -3', [\'FFn'], [\'tb3-FF'], 0],['6bc', '-t -b -3 -l 24', [\'FnFn'], [\'tb3-FF'], 0],## Do not print header and footer nor "FF set by Hand" (-T option)['7a', '-T -l 24', [\'tn'], [\'tt-t'], 0],['7b', '-T -l 17 -f', [\'tn'], [\'tt-t'], 0],['7c', '-T -l 17 -f', [\'tFFt-bl'], [\'tt-bl'], 0],['7d', '-T -l 24', [\'0FnFnt'], [\'tt-0FF'], 0],['7e', '-T -l 24', [\'FFn'], [\'tt-FF'], 0],['7f', '-T -l 24', [\'FnFn'], [\'tt-FF'], 0],['7g', '-T -l 17 -f', [\'FFn'], [\'tt-FF'], 0],['7aa', '-T -a -3', [\'0FnFnt'], [\'tta3-0FF'], 0],['7ab', '-T -a -3', [\'FFn'], [\'tta3-FF'], 0],['7ac', '-T -a -3 -l 24', [\'FnFn'], [\'tta3-FF'], 0],['7ba', '-T -b -3', [\'0FnFnt'], [\'ttb3-0FF'], 0],['7bb', '-T -b -3', [\'FFn'], [\'ttb3-FF'], 0],['7bc', '-T -b -3 -l 24', [\'FnFn'], [\'ttb3-FF'], 0],## lhs-truncation of header# pr-1.19m: Text line truncation only with column output## numbering lines (-n -N option)# skip pages (+FIRST_PAGE[:LAST_PAGE] option)['9a', '-n.3 -l 17 -f', [\'tFFt-bl'], [\'nl17f-bl'], 0],['9b', '-n.3 -N 15 -l 17 -f', [\'tFFt-bl'], [\'nN15l17f-bl'], 0],['9Pa', '-n.3 +2 -l 17 -f', [\'tFFt-bl'], [\'n+2l17f-bl'], 0],['9Pb', '-n.3 +3 -l 17 -f', [\'tFFt-bl'], [\'n+3l17f-bl'], 0],['9Pc', '-n.3 -N 1 +3 -l 17 -f', [\'tFFt-bl'], [\'nN1+3l17f-bl'], 0],['9Pe', '-n.3 +2 -l 17 -f', [\'0FFt'], [\'n+2l17f-0FF'], 0],['9Pf', '-n.3 +2 -l 17 -f', [\'0FFnt'], [\'n+2l17f-0FF'], 0],['9Pg', '-n.3 +2 -l 17 -f', [\'0FnFt'], [\'n+2l17f-0FF'], 0],
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -