From 9c3c74b4919c213bfb76025d4ed26ce3a2c8caf6 Mon Sep 17 00:00:00 2001 From: Lynn Date: Wed, 25 Dec 2019 09:20:44 -0800 Subject: [PATCH] Revert "test changing line endings" This reverts commit 813b4dd1d0fa22b377b9e0e71c1193b8ed61e04d. --- testdata/expected-doc-full.man | 166 +++++++++++++-------------- testdata/expected-doc-full.md | 126 ++++++++++---------- testdata/expected-doc-no-authors.md | 122 ++++++++++---------- testdata/expected-doc-no-commands.md | 74 ++++++------ testdata/expected-doc-no-flags.md | 96 ++++++++-------- testdata/expected-fish-full.fish | 56 ++++----- 6 files changed, 320 insertions(+), 320 deletions(-) diff --git a/testdata/expected-doc-full.man b/testdata/expected-doc-full.man index a4fd448..f28f4c7 100644 --- a/testdata/expected-doc-full.man +++ b/testdata/expected-doc-full.man @@ -1,83 +1,83 @@ -.nh -.TH greet(8) - -.SH Harrison harrison@lolwut.com -\[la]mailto:harrison@lolwut.com\[ra] -Oliver Allen oliver@toyshop.com -\[la]mailto:oliver@toyshop.com\[ra] - -.SH NAME -.PP -greet \- Some app - - -.SH SYNOPSIS -.PP -greet - -.PP -.RS - -.nf -[\-\-another\-flag|\-b] -[\-\-flag|\-\-fl|\-f]=[value] -[\-\-socket|\-s]=[value] - -.fi -.RE - - -.SH DESCRIPTION -.PP -app [first\_arg] [second\_arg] - -.PP -\fBUsage\fP: - -.PP -.RS - -.nf -greet [GLOBAL OPTIONS] command [COMMAND OPTIONS] [ARGUMENTS...] - -.fi -.RE - - -.SH GLOBAL OPTIONS -.PP -\fB\-\-another\-flag, \-b\fP: another usage text - -.PP -\fB\-\-flag, \-\-fl, \-f\fP="": - -.PP -\fB\-\-socket, \-s\fP="": some 'usage' text (default: value) - - -.SH COMMANDS -.SH config, c -.PP -another usage test - -.PP -\fB\-\-another\-flag, \-b\fP: another usage text - -.PP -\fB\-\-flag, \-\-fl, \-f\fP="": - -.SS sub\-config, s, ss -.PP -another usage test - -.PP -\fB\-\-sub\-command\-flag, \-s\fP: some usage text - -.PP -\fB\-\-sub\-flag, \-\-sub\-fl, \-s\fP="": - -.SH info, i, in -.PP -retrieve generic information - -.SH some\-command +.nh +.TH greet(8) + +.SH Harrison harrison@lolwut.com +\[la]mailto:harrison@lolwut.com\[ra] +Oliver Allen oliver@toyshop.com +\[la]mailto:oliver@toyshop.com\[ra] + +.SH NAME +.PP +greet \- Some app + + +.SH SYNOPSIS +.PP +greet + +.PP +.RS + +.nf +[\-\-another\-flag|\-b] +[\-\-flag|\-\-fl|\-f]=[value] +[\-\-socket|\-s]=[value] + +.fi +.RE + + +.SH DESCRIPTION +.PP +app [first\_arg] [second\_arg] + +.PP +\fBUsage\fP: + +.PP +.RS + +.nf +greet [GLOBAL OPTIONS] command [COMMAND OPTIONS] [ARGUMENTS...] + +.fi +.RE + + +.SH GLOBAL OPTIONS +.PP +\fB\-\-another\-flag, \-b\fP: another usage text + +.PP +\fB\-\-flag, \-\-fl, \-f\fP="": + +.PP +\fB\-\-socket, \-s\fP="": some 'usage' text (default: value) + + +.SH COMMANDS +.SH config, c +.PP +another usage test + +.PP +\fB\-\-another\-flag, \-b\fP: another usage text + +.PP +\fB\-\-flag, \-\-fl, \-f\fP="": + +.SS sub\-config, s, ss +.PP +another usage test + +.PP +\fB\-\-sub\-command\-flag, \-s\fP: some usage text + +.PP +\fB\-\-sub\-flag, \-\-sub\-fl, \-s\fP="": + +.SH info, i, in +.PP +retrieve generic information + +.SH some\-command \ No newline at end of file diff --git a/testdata/expected-doc-full.md b/testdata/expected-doc-full.md index 044ac57..5bfb01e 100644 --- a/testdata/expected-doc-full.md +++ b/testdata/expected-doc-full.md @@ -1,63 +1,63 @@ -% greet(8) - -% Harrison -% Oliver Allen - -# NAME - -greet - Some app - -# SYNOPSIS - -greet - -``` -[--another-flag|-b] -[--flag|--fl|-f]=[value] -[--socket|-s]=[value] -``` - -# DESCRIPTION - -app [first_arg] [second_arg] - -**Usage**: - -``` -greet [GLOBAL OPTIONS] command [COMMAND OPTIONS] [ARGUMENTS...] -``` - -# GLOBAL OPTIONS - -**--another-flag, -b**: another usage text - -**--flag, --fl, -f**="": - -**--socket, -s**="": some 'usage' text (default: value) - - -# COMMANDS - -## config, c - -another usage test - -**--another-flag, -b**: another usage text - -**--flag, --fl, -f**="": - -### sub-config, s, ss - -another usage test - -**--sub-command-flag, -s**: some usage text - -**--sub-flag, --sub-fl, -s**="": - -## info, i, in - -retrieve generic information - -## some-command - - +% greet(8) + +% Harrison +% Oliver Allen + +# NAME + +greet - Some app + +# SYNOPSIS + +greet + +``` +[--another-flag|-b] +[--flag|--fl|-f]=[value] +[--socket|-s]=[value] +``` + +# DESCRIPTION + +app [first_arg] [second_arg] + +**Usage**: + +``` +greet [GLOBAL OPTIONS] command [COMMAND OPTIONS] [ARGUMENTS...] +``` + +# GLOBAL OPTIONS + +**--another-flag, -b**: another usage text + +**--flag, --fl, -f**="": + +**--socket, -s**="": some 'usage' text (default: value) + + +# COMMANDS + +## config, c + +another usage test + +**--another-flag, -b**: another usage text + +**--flag, --fl, -f**="": + +### sub-config, s, ss + +another usage test + +**--sub-command-flag, -s**: some usage text + +**--sub-flag, --sub-fl, -s**="": + +## info, i, in + +retrieve generic information + +## some-command + + diff --git a/testdata/expected-doc-no-authors.md b/testdata/expected-doc-no-authors.md index f471062..a49481a 100644 --- a/testdata/expected-doc-no-authors.md +++ b/testdata/expected-doc-no-authors.md @@ -1,61 +1,61 @@ -% greet(8) - - -# NAME - -greet - Some app - -# SYNOPSIS - -greet - -``` -[--another-flag|-b] -[--flag|--fl|-f]=[value] -[--socket|-s]=[value] -``` - -# DESCRIPTION - -app [first_arg] [second_arg] - -**Usage**: - -``` -greet [GLOBAL OPTIONS] command [COMMAND OPTIONS] [ARGUMENTS...] -``` - -# GLOBAL OPTIONS - -**--another-flag, -b**: another usage text - -**--flag, --fl, -f**="": - -**--socket, -s**="": some 'usage' text (default: value) - - -# COMMANDS - -## config, c - -another usage test - -**--another-flag, -b**: another usage text - -**--flag, --fl, -f**="": - -### sub-config, s, ss - -another usage test - -**--sub-command-flag, -s**: some usage text - -**--sub-flag, --sub-fl, -s**="": - -## info, i, in - -retrieve generic information - -## some-command - - +% greet(8) + + +# NAME + +greet - Some app + +# SYNOPSIS + +greet + +``` +[--another-flag|-b] +[--flag|--fl|-f]=[value] +[--socket|-s]=[value] +``` + +# DESCRIPTION + +app [first_arg] [second_arg] + +**Usage**: + +``` +greet [GLOBAL OPTIONS] command [COMMAND OPTIONS] [ARGUMENTS...] +``` + +# GLOBAL OPTIONS + +**--another-flag, -b**: another usage text + +**--flag, --fl, -f**="": + +**--socket, -s**="": some 'usage' text (default: value) + + +# COMMANDS + +## config, c + +another usage test + +**--another-flag, -b**: another usage text + +**--flag, --fl, -f**="": + +### sub-config, s, ss + +another usage test + +**--sub-command-flag, -s**: some usage text + +**--sub-flag, --sub-fl, -s**="": + +## info, i, in + +retrieve generic information + +## some-command + + diff --git a/testdata/expected-doc-no-commands.md b/testdata/expected-doc-no-commands.md index 3307e99..f82f642 100644 --- a/testdata/expected-doc-no-commands.md +++ b/testdata/expected-doc-no-commands.md @@ -1,37 +1,37 @@ -% greet(8) - -% Harrison -% Oliver Allen - -# NAME - -greet - Some app - -# SYNOPSIS - -greet - -``` -[--another-flag|-b] -[--flag|--fl|-f]=[value] -[--socket|-s]=[value] -``` - -# DESCRIPTION - -app [first_arg] [second_arg] - -**Usage**: - -``` -greet [GLOBAL OPTIONS] command [COMMAND OPTIONS] [ARGUMENTS...] -``` - -# GLOBAL OPTIONS - -**--another-flag, -b**: another usage text - -**--flag, --fl, -f**="": - -**--socket, -s**="": some 'usage' text (default: value) - +% greet(8) + +% Harrison +% Oliver Allen + +# NAME + +greet - Some app + +# SYNOPSIS + +greet + +``` +[--another-flag|-b] +[--flag|--fl|-f]=[value] +[--socket|-s]=[value] +``` + +# DESCRIPTION + +app [first_arg] [second_arg] + +**Usage**: + +``` +greet [GLOBAL OPTIONS] command [COMMAND OPTIONS] [ARGUMENTS...] +``` + +# GLOBAL OPTIONS + +**--another-flag, -b**: another usage text + +**--flag, --fl, -f**="": + +**--socket, -s**="": some 'usage' text (default: value) + diff --git a/testdata/expected-doc-no-flags.md b/testdata/expected-doc-no-flags.md index dbf8793..c32a9fc 100644 --- a/testdata/expected-doc-no-flags.md +++ b/testdata/expected-doc-no-flags.md @@ -1,48 +1,48 @@ -% greet(8) - -% Harrison -% Oliver Allen - -# NAME - -greet - Some app - -# SYNOPSIS - -greet - -# DESCRIPTION - -app [first_arg] [second_arg] - -**Usage**: - -``` -greet [GLOBAL OPTIONS] command [COMMAND OPTIONS] [ARGUMENTS...] -``` - -# COMMANDS - -## config, c - -another usage test - -**--another-flag, -b**: another usage text - -**--flag, --fl, -f**="": - -### sub-config, s, ss - -another usage test - -**--sub-command-flag, -s**: some usage text - -**--sub-flag, --sub-fl, -s**="": - -## info, i, in - -retrieve generic information - -## some-command - - +% greet(8) + +% Harrison +% Oliver Allen + +# NAME + +greet - Some app + +# SYNOPSIS + +greet + +# DESCRIPTION + +app [first_arg] [second_arg] + +**Usage**: + +``` +greet [GLOBAL OPTIONS] command [COMMAND OPTIONS] [ARGUMENTS...] +``` + +# COMMANDS + +## config, c + +another usage test + +**--another-flag, -b**: another usage text + +**--flag, --fl, -f**="": + +### sub-config, s, ss + +another usage test + +**--sub-command-flag, -s**: some usage text + +**--sub-flag, --sub-fl, -s**="": + +## info, i, in + +retrieve generic information + +## some-command + + diff --git a/testdata/expected-fish-full.fish b/testdata/expected-fish-full.fish index 350bd67..b18d51e 100644 --- a/testdata/expected-fish-full.fish +++ b/testdata/expected-fish-full.fish @@ -1,28 +1,28 @@ -# greet fish shell completion - -function __fish_greet_no_subcommand --description 'Test if there has been any subcommand yet' - for i in (commandline -opc) - if contains -- $i config c sub-config s ss info i in some-command - return 1 - end - end - return 0 -end - -complete -c greet -n '__fish_greet_no_subcommand' -l socket -s s -r -d 'some \'usage\' text' -complete -c greet -n '__fish_greet_no_subcommand' -f -l flag -s fl -s f -r -complete -c greet -n '__fish_greet_no_subcommand' -f -l another-flag -s b -d 'another usage text' -complete -c greet -n '__fish_greet_no_subcommand' -f -l help -s h -d 'show help' -complete -c greet -n '__fish_greet_no_subcommand' -f -l version -s v -d 'print the version' -complete -c greet -n '__fish_seen_subcommand_from config c' -f -l help -s h -d 'show help' -complete -r -c greet -n '__fish_greet_no_subcommand' -a 'config c' -d 'another usage test' -complete -c greet -n '__fish_seen_subcommand_from config c' -l flag -s fl -s f -r -complete -c greet -n '__fish_seen_subcommand_from config c' -f -l another-flag -s b -d 'another usage text' -complete -c greet -n '__fish_seen_subcommand_from sub-config s ss' -f -l help -s h -d 'show help' -complete -r -c greet -n '__fish_seen_subcommand_from config c' -a 'sub-config s ss' -d 'another usage test' -complete -c greet -n '__fish_seen_subcommand_from sub-config s ss' -f -l sub-flag -s sub-fl -s s -r -complete -c greet -n '__fish_seen_subcommand_from sub-config s ss' -f -l sub-command-flag -s s -d 'some usage text' -complete -c greet -n '__fish_seen_subcommand_from info i in' -f -l help -s h -d 'show help' -complete -r -c greet -n '__fish_greet_no_subcommand' -a 'info i in' -d 'retrieve generic information' -complete -c greet -n '__fish_seen_subcommand_from some-command' -f -l help -s h -d 'show help' -complete -r -c greet -n '__fish_greet_no_subcommand' -a 'some-command' +# greet fish shell completion + +function __fish_greet_no_subcommand --description 'Test if there has been any subcommand yet' + for i in (commandline -opc) + if contains -- $i config c sub-config s ss info i in some-command + return 1 + end + end + return 0 +end + +complete -c greet -n '__fish_greet_no_subcommand' -l socket -s s -r -d 'some \'usage\' text' +complete -c greet -n '__fish_greet_no_subcommand' -f -l flag -s fl -s f -r +complete -c greet -n '__fish_greet_no_subcommand' -f -l another-flag -s b -d 'another usage text' +complete -c greet -n '__fish_greet_no_subcommand' -f -l help -s h -d 'show help' +complete -c greet -n '__fish_greet_no_subcommand' -f -l version -s v -d 'print the version' +complete -c greet -n '__fish_seen_subcommand_from config c' -f -l help -s h -d 'show help' +complete -r -c greet -n '__fish_greet_no_subcommand' -a 'config c' -d 'another usage test' +complete -c greet -n '__fish_seen_subcommand_from config c' -l flag -s fl -s f -r +complete -c greet -n '__fish_seen_subcommand_from config c' -f -l another-flag -s b -d 'another usage text' +complete -c greet -n '__fish_seen_subcommand_from sub-config s ss' -f -l help -s h -d 'show help' +complete -r -c greet -n '__fish_seen_subcommand_from config c' -a 'sub-config s ss' -d 'another usage test' +complete -c greet -n '__fish_seen_subcommand_from sub-config s ss' -f -l sub-flag -s sub-fl -s s -r +complete -c greet -n '__fish_seen_subcommand_from sub-config s ss' -f -l sub-command-flag -s s -d 'some usage text' +complete -c greet -n '__fish_seen_subcommand_from info i in' -f -l help -s h -d 'show help' +complete -r -c greet -n '__fish_greet_no_subcommand' -a 'info i in' -d 'retrieve generic information' +complete -c greet -n '__fish_seen_subcommand_from some-command' -f -l help -s h -d 'show help' +complete -r -c greet -n '__fish_greet_no_subcommand' -a 'some-command'