github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/builtins/core/tabulate/tabulate_make_test.go (about) 1 package tabulate 2 3 import ( 4 "testing" 5 6 "github.com/lmorg/murex/lang/types" 7 "github.com/lmorg/murex/test" 8 ) 9 10 var ( 11 inMake = `Usage: make [options] [target] ... 12 Options: 13 -b, -m Ignored for compatibility. 14 -B, --always-make Unconditionally make all targets. 15 -C DIRECTORY, --directory=DIRECTORY 16 Change to DIRECTORY before doing anything. 17 -d Print lots of debugging information. 18 --debug[=FLAGS] Print various types of debugging information. 19 -e, --environment-overrides 20 Environment variables override makefiles. 21 -E STRING, --eval=STRING Evaluate STRING as a makefile statement. 22 -f FILE, --file=FILE, --makefile=FILE 23 Read FILE as a makefile. 24 -h, --help Print this message and exit. 25 -i, --ignore-errors Ignore errors from recipes. 26 -I DIRECTORY, --include-dir=DIRECTORY 27 Search DIRECTORY for included makefiles. 28 -j [N], --jobs[=N] Allow N jobs at once; infinite jobs with no arg. 29 -k, --keep-going Keep going when some targets can't be made. 30 -l [N], --load-average[=N], --max-load[=N] 31 Don't start multiple jobs unless load is below N. 32 -L, --check-symlink-times Use the latest mtime between symlinks and target. 33 -n, --just-print, --dry-run, --recon 34 Don't actually run any recipe; just print them. 35 -o FILE, --old-file=FILE, --assume-old=FILE 36 Consider FILE to be very old and don't remake it. 37 -O[TYPE], --output-sync[=TYPE] 38 Synchronize output of parallel jobs by TYPE. 39 -p, --print-data-base Print make's internal database. 40 -q, --question Run no recipe; exit status says if up to date. 41 -r, --no-builtin-rules Disable the built-in implicit rules. 42 -R, --no-builtin-variables Disable the built-in variable settings. 43 -s, --silent, --quiet Don't echo recipes. 44 --no-silent Echo recipes (disable --silent mode). 45 -S, --no-keep-going, --stop 46 Turns off -k. 47 -t, --touch Touch targets instead of remaking them. 48 --trace Print tracing information. 49 -v, --version Print the version number of make and exit. 50 -w, --print-directory Print the current directory. 51 --no-print-directory Turn off -w, even if it was turned on implicitly. 52 -W FILE, --what-if=FILE, --new-file=FILE, --assume-new=FILE 53 Consider FILE to be infinitely new. 54 --warn-undefined-variables Warn when an undefined variable is referenced. 55 56 This program built for x86_64-pc-linux-gnu 57 Report bugs to <bug-make@gnu.org> 58 ` 59 60 jsonMake = `{"--always-make":"Unconditionally make all targets.","--assume-new=":"(args: FILE) Consider FILE to be infinitely new.","--assume-old=":"(args: FILE) Consider FILE to be very old and don't remake it.","--check-symlink-times":"Use the latest mtime between symlinks and target.","--debug":"(args: [=FLAGS]) Print various types of debugging information.","--directory=":"(args: DIRECTORY) Change to DIRECTORY before doing anything.","--dry-run":"Don't actually run any recipe; just print them.","--environment-overrides":"Environment variables override makefiles.","--eval=":"(args: STRING) Evaluate STRING as a makefile statement.","--file=":"(args: FILE) Read FILE as a makefile.","--help":"Print this message and exit.","--ignore-errors":"Ignore errors from recipes.","--include-dir=":"(args: DIRECTORY) Search DIRECTORY for included makefiles.","--jobs":"(args: [=N]) Allow N jobs at once; infinite jobs with no arg.","--just-print":"Don't actually run any recipe; just print them.","--keep-going":"Keep going when some targets can't be made.","--load-average":"(args: [=N]) Don't start multiple jobs unless load is below N.","--makefile=":"(args: FILE) Read FILE as a makefile.","--max-load":"(args: [=N]) Don't start multiple jobs unless load is below N.","--new-file=":"(args: FILE) Consider FILE to be infinitely new.","--no-builtin-rules":"Disable the built-in implicit rules.","--no-builtin-variables":"Disable the built-in variable settings.","--no-keep-going":"Turns off -k.","--no-print-directory":"Turn off -w, even if it was turned on implicitly.","--no-silent":"Echo recipes (disable --silent mode).","--old-file=":"(args: FILE) Consider FILE to be very old and don't remake it.","--output-sync":"(args: [=TYPE]) Synchronize output of parallel jobs by TYPE.","--print-data-base":"Print make's internal database.","--print-directory":"Print the current directory.","--question":"Run no recipe; exit status says if up to date.","--quiet":"Don't echo recipes.","--recon":"Don't actually run any recipe; just print them.","--silent":"Don't echo recipes.","--stop":"Turns off -k.","--touch":"Touch targets instead of remaking them.","--trace":"Print tracing information.","--version":"Print the version number of make and exit.","--warn-undefined-variables":"Warn when an undefined variable is referenced.","--what-if=":"(args: FILE) Consider FILE to be infinitely new.","-B":"Unconditionally make all targets.","-C":"(args: DIRECTORY) Change to DIRECTORY before doing anything.","-E":"(args: STRING) Evaluate STRING as a makefile statement.","-I":"(args: DIRECTORY) Search DIRECTORY for included makefiles.","-L":"Use the latest mtime between symlinks and target.","-O":"(args: [=TYPE]) Synchronize output of parallel jobs by TYPE.","-R":"Disable the built-in variable settings.","-S":"Turns off -k.","-W":"(args: FILE) Consider FILE to be infinitely new.","-b":"Ignored for compatibility.","-d":"Print lots of debugging information.","-e":"Environment variables override makefiles.","-f":"(args: FILE) Read FILE as a makefile.","-h":"Print this message and exit.","-i":"Ignore errors from recipes.","-j":"(args: [=N]) Allow N jobs at once; infinite jobs with no arg.","-k":"Keep going when some targets can't be made.","-l":"(args: [=N]) Don't start multiple jobs unless load is below N.","-m":"Ignored for compatibility.","-n":"Don't actually run any recipe; just print them.","-o":"(args: FILE) Consider FILE to be very old and don't remake it.","-p":"Print make's internal database.","-q":"Run no recipe; exit status says if up to date.","-r":"Disable the built-in implicit rules.","-s":"Don't echo recipes.","-t":"Touch targets instead of remaking them.","-v":"Print the version number of make and exit.","-w":"Print the current directory."}` 61 ) 62 63 func TestTabulateMake(t *testing.T) { 64 test.RunMethodTest(t, 65 cmdTabulate, "tabulate", 66 inMake, 67 types.Generic, 68 []string{fMap, fColumnWraps, fSplitComma, fKeyIncHint}, 69 jsonMake, 70 nil, 71 ) 72 }