Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readtags: revise feature listing ptags (including an incompatible change) #4095

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 48 additions & 48 deletions Tmain/readtags-canonicalize-input-names.d/stdout-expected.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,31 +73,31 @@ w_fn /abc/w.c
# drive-letter0.tags --canonicalize-input -l
# drive-letter1.tags -C -l
# good-ptags.tags -C -D
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/
!_TAG_OUTPUT_FILESEP slash /slash or backslash/
!_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/
!_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/
!_TAG_PROC_CWD /tmp //
!_TAG_PROGRAM_AUTHOR Universal Ctags Team //
!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/
!_TAG_PROGRAM_URL https://ctags.io/ /official site/
!_TAG_PROGRAM_VERSION 5.9.0 /e08db39a3/
!_TAG_PROC_DUMMY /../../tmp //
!_TAG_FILE_FORMAT 2
!_TAG_FILE_SORTED 1
!_TAG_OUTPUT_EXCMD mixed
!_TAG_OUTPUT_FILESEP slash
!_TAG_OUTPUT_MODE u-ctags
!_TAG_PATTERN_LENGTH_LIMIT 96
!_TAG_PROC_CWD /tmp
!_TAG_PROGRAM_AUTHOR Universal Ctags Team
!_TAG_PROGRAM_NAME Universal Ctags
!_TAG_PROGRAM_URL https://ctags.io/
!_TAG_PROGRAM_VERSION 5.9.0
!_TAG_PROC_DUMMY /../../tmp
# good-ptags.tags -C --list-pseudo-tags
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/
!_TAG_OUTPUT_FILESEP slash /slash or backslash/
!_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/
!_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/
!_TAG_PROC_CWD /tmp //
!_TAG_PROGRAM_AUTHOR Universal Ctags Team //
!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/
!_TAG_PROGRAM_URL https://ctags.io/ /official site/
!_TAG_PROGRAM_VERSION 5.9.0 /e08db39a3/
!_TAG_PROC_DUMMY /../../tmp //
!_TAG_FILE_FORMAT 2
!_TAG_FILE_SORTED 1
!_TAG_OUTPUT_EXCMD mixed
!_TAG_OUTPUT_FILESEP slash
!_TAG_OUTPUT_MODE u-ctags
!_TAG_PATTERN_LENGTH_LIMIT 96
!_TAG_PROC_CWD /tmp
!_TAG_PROGRAM_AUTHOR Universal Ctags Team
!_TAG_PROGRAM_NAME Universal Ctags
!_TAG_PROGRAM_URL https://ctags.io/
!_TAG_PROGRAM_VERSION 5.9.0
!_TAG_PROC_DUMMY /../../tmp
# good0.tags -A -l
a_fn /tmp/abc/xyz/a.c
b_fn /tmp/abc/b.c
Expand Down Expand Up @@ -173,28 +173,28 @@ w_fn /abc/w.c
# drive-letter0.tags --absolute-input -l
# drive-letter1.tags -A -l
# good-ptags.tags -A -D
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/
!_TAG_OUTPUT_FILESEP slash /slash or backslash/
!_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/
!_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/
!_TAG_PROC_CWD /tmp //
!_TAG_PROGRAM_AUTHOR Universal Ctags Team //
!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/
!_TAG_PROGRAM_URL https://ctags.io/ /official site/
!_TAG_PROGRAM_VERSION 5.9.0 /e08db39a3/
!_TAG_PROC_DUMMY /../../tmp //
!_TAG_FILE_FORMAT 2
!_TAG_FILE_SORTED 1
!_TAG_OUTPUT_EXCMD mixed
!_TAG_OUTPUT_FILESEP slash
!_TAG_OUTPUT_MODE u-ctags
!_TAG_PATTERN_LENGTH_LIMIT 96
!_TAG_PROC_CWD /tmp
!_TAG_PROGRAM_AUTHOR Universal Ctags Team
!_TAG_PROGRAM_NAME Universal Ctags
!_TAG_PROGRAM_URL https://ctags.io/
!_TAG_PROGRAM_VERSION 5.9.0
!_TAG_PROC_DUMMY /../../tmp
# good-ptags.tags -A --list-pseudo-tags
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/
!_TAG_OUTPUT_FILESEP slash /slash or backslash/
!_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/
!_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/
!_TAG_PROC_CWD /tmp //
!_TAG_PROGRAM_AUTHOR Universal Ctags Team //
!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/
!_TAG_PROGRAM_URL https://ctags.io/ /official site/
!_TAG_PROGRAM_VERSION 5.9.0 /e08db39a3/
!_TAG_PROC_DUMMY /../../tmp //
!_TAG_FILE_FORMAT 2
!_TAG_FILE_SORTED 1
!_TAG_OUTPUT_EXCMD mixed
!_TAG_OUTPUT_FILESEP slash
!_TAG_OUTPUT_MODE u-ctags
!_TAG_PATTERN_LENGTH_LIMIT 96
!_TAG_PROC_CWD /tmp
!_TAG_PROGRAM_AUTHOR Universal Ctags Team
!_TAG_PROGRAM_NAME Universal Ctags
!_TAG_PROGRAM_URL https://ctags.io/
!_TAG_PROGRAM_VERSION 5.9.0
!_TAG_PROC_DUMMY /../../tmp
16 changes: 14 additions & 2 deletions Tmain/readtags-list-pseudo-tags.d/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,20 @@ V=

skip_if_no_readtags "$READTAGS"

echo '# SORT=NO'
echo '# SORT=NO (-D)'
${V} ${READTAGS} -t ./ptag-sort-no.tags -D

echo '# SORT=YES'
echo '# SORT=NO (-P)'
${V} ${READTAGS} -t ./ptag-sort-no.tags -P no-such-tags

echo '# SORT=YES (-D)'
${V} ${READTAGS} -t ./ptag-sort-yes.tags -D

echo '# SORT=YES (-P)'
${V} ${READTAGS} -t ./ptag-sort-yes.tags -P no-such-tags

echo '# -D + FILTER (-D)'
${V} ${READTAGS} -t ./ptag-sort-yes.tags -Q '(#/MA/i $name)' -D

echo '# -P -l + FILTER (-D)'
${V} ${READTAGS} -t ./ptag-sort-yes.tags -Q '(#/MA/i $name)' -P -l
152 changes: 150 additions & 2 deletions Tmain/readtags-list-pseudo-tags.d/stdout-expected.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SORT=NO
# SORT=NO (-D)
!_JSON_OUTPUT_VERSION 0.0 /in development/
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted, 2=foldcase/
Expand Down Expand Up @@ -41,7 +41,154 @@
!_TAG_KIND_DESCRIPTION!EmacsLisp G,group /customization groups/
!_TAG_KIND_DESCRIPTION!EmacsLisp H,face /customizable faces/
!_TAG_KIND_DESCRIPTION!EmacsLisp T,theme /custom themes/
# SORT=YES
# SORT=NO (-P)
!_JSON_OUTPUT_VERSION 0.0 /in development/
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_PROGRAM_AUTHOR Universal Ctags Team //
!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/
!_TAG_PROGRAM_URL https://ctags.io/ /official site/
!_TAG_PROGRAM_VERSION 0.0.0 /9b73623f/
!_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/
!_TAG_OUTPUT_FILESEP slash /slash or backslash/
!_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/
!_TAG_KIND_DESCRIPTION!C d,macro /macro definitions/
!_TAG_KIND_DESCRIPTION!C e,enumerator /enumerators (values inside an enumeration)/
!_TAG_KIND_DESCRIPTION!C f,function /function definitions/
!_TAG_KIND_DESCRIPTION!C g,enum /enumeration names/
!_TAG_KIND_DESCRIPTION!C h,header /included header files/
!_TAG_KIND_DESCRIPTION!C l,local /local variables/
!_TAG_KIND_DESCRIPTION!C m,member /struct, and union members/
!_TAG_KIND_DESCRIPTION!C p,prototype /function prototypes/
!_TAG_KIND_DESCRIPTION!C s,struct /structure names/
!_TAG_KIND_DESCRIPTION!C t,typedef /typedefs/
!_TAG_KIND_DESCRIPTION!C u,union /union names/
!_TAG_KIND_DESCRIPTION!C v,variable /variable definitions/
!_TAG_KIND_DESCRIPTION!C x,externvar /external and forward variable declarations/
!_TAG_KIND_DESCRIPTION!C z,parameter /function parameters inside function definitions/
!_TAG_KIND_DESCRIPTION!C L,label /goto labels/
!_TAG_KIND_DESCRIPTION!C D,macroparam /parameters inside macro definitions/
!_TAG_KIND_DESCRIPTION!EmacsLisp u,unknown /unknown type of definitions/
!_TAG_KIND_DESCRIPTION!EmacsLisp f,function /functions/
!_TAG_KIND_DESCRIPTION!EmacsLisp v,variable /variables/
!_TAG_KIND_DESCRIPTION!EmacsLisp c,const /constants/
!_TAG_KIND_DESCRIPTION!EmacsLisp m,macro /macros/
!_TAG_KIND_DESCRIPTION!EmacsLisp a,alias /aliases for functions/
!_TAG_KIND_DESCRIPTION!EmacsLisp V,varalias /aliases for variables/
!_TAG_KIND_DESCRIPTION!EmacsLisp s,subst /inline function/
!_TAG_KIND_DESCRIPTION!EmacsLisp i,inline /inline function/
!_TAG_KIND_DESCRIPTION!EmacsLisp e,error /errors/
!_TAG_KIND_DESCRIPTION!EmacsLisp M,minorMode /minor modes/
!_TAG_KIND_DESCRIPTION!EmacsLisp D,derivedMode /derived major mode/
!_TAG_KIND_DESCRIPTION!EmacsLisp C,custom /customizable variables/
!_TAG_KIND_DESCRIPTION!EmacsLisp G,group /customization groups/
!_TAG_KIND_DESCRIPTION!EmacsLisp H,face /customizable faces/
!_TAG_KIND_DESCRIPTION!EmacsLisp T,theme /custom themes/
# SORT=YES (-D)
!_JSON_OUTPUT_VERSION 0.0 /in development/
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_KIND_DESCRIPTION!C D,macroparam /parameters inside macro definitions/
!_TAG_KIND_DESCRIPTION!C L,label /goto labels/
!_TAG_KIND_DESCRIPTION!C d,macro /macro definitions/
!_TAG_KIND_DESCRIPTION!C e,enumerator /enumerators (values inside an enumeration)/
!_TAG_KIND_DESCRIPTION!C f,function /function definitions/
!_TAG_KIND_DESCRIPTION!C g,enum /enumeration names/
!_TAG_KIND_DESCRIPTION!C h,header /included header files/
!_TAG_KIND_DESCRIPTION!C l,local /local variables/
!_TAG_KIND_DESCRIPTION!C m,member /struct, and union members/
!_TAG_KIND_DESCRIPTION!C p,prototype /function prototypes/
!_TAG_KIND_DESCRIPTION!C s,struct /structure names/
!_TAG_KIND_DESCRIPTION!C t,typedef /typedefs/
!_TAG_KIND_DESCRIPTION!C u,union /union names/
!_TAG_KIND_DESCRIPTION!C v,variable /variable definitions/
!_TAG_KIND_DESCRIPTION!C x,externvar /external and forward variable declarations/
!_TAG_KIND_DESCRIPTION!C z,parameter /function parameters inside function definitions/
!_TAG_KIND_DESCRIPTION!EmacsLisp C,custom /customizable variables/
!_TAG_KIND_DESCRIPTION!EmacsLisp D,derivedMode /derived major mode/
!_TAG_KIND_DESCRIPTION!EmacsLisp G,group /customization groups/
!_TAG_KIND_DESCRIPTION!EmacsLisp H,face /customizable faces/
!_TAG_KIND_DESCRIPTION!EmacsLisp M,minorMode /minor modes/
!_TAG_KIND_DESCRIPTION!EmacsLisp T,theme /custom themes/
!_TAG_KIND_DESCRIPTION!EmacsLisp V,varalias /aliases for variables/
!_TAG_KIND_DESCRIPTION!EmacsLisp a,alias /aliases for functions/
!_TAG_KIND_DESCRIPTION!EmacsLisp c,const /constants/
!_TAG_KIND_DESCRIPTION!EmacsLisp e,error /errors/
!_TAG_KIND_DESCRIPTION!EmacsLisp f,function /functions/
!_TAG_KIND_DESCRIPTION!EmacsLisp i,inline /inline function/
!_TAG_KIND_DESCRIPTION!EmacsLisp m,macro /macros/
!_TAG_KIND_DESCRIPTION!EmacsLisp s,subst /inline function/
!_TAG_KIND_DESCRIPTION!EmacsLisp u,unknown /unknown type of definitions/
!_TAG_KIND_DESCRIPTION!EmacsLisp v,variable /variables/
!_TAG_OUTPUT_FILESEP slash /slash or backslash/
!_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/
!_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/
!_TAG_PROGRAM_AUTHOR Universal Ctags Team //
!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/
!_TAG_PROGRAM_URL https://ctags.io/ /official site/
!_TAG_PROGRAM_VERSION 0.0.0 /9b73623f/
# SORT=YES (-P)
!_JSON_OUTPUT_VERSION 0.0 /in development/
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_KIND_DESCRIPTION!C D,macroparam /parameters inside macro definitions/
!_TAG_KIND_DESCRIPTION!C L,label /goto labels/
!_TAG_KIND_DESCRIPTION!C d,macro /macro definitions/
!_TAG_KIND_DESCRIPTION!C e,enumerator /enumerators (values inside an enumeration)/
!_TAG_KIND_DESCRIPTION!C f,function /function definitions/
!_TAG_KIND_DESCRIPTION!C g,enum /enumeration names/
!_TAG_KIND_DESCRIPTION!C h,header /included header files/
!_TAG_KIND_DESCRIPTION!C l,local /local variables/
!_TAG_KIND_DESCRIPTION!C m,member /struct, and union members/
!_TAG_KIND_DESCRIPTION!C p,prototype /function prototypes/
!_TAG_KIND_DESCRIPTION!C s,struct /structure names/
!_TAG_KIND_DESCRIPTION!C t,typedef /typedefs/
!_TAG_KIND_DESCRIPTION!C u,union /union names/
!_TAG_KIND_DESCRIPTION!C v,variable /variable definitions/
!_TAG_KIND_DESCRIPTION!C x,externvar /external and forward variable declarations/
!_TAG_KIND_DESCRIPTION!C z,parameter /function parameters inside function definitions/
!_TAG_KIND_DESCRIPTION!EmacsLisp C,custom /customizable variables/
!_TAG_KIND_DESCRIPTION!EmacsLisp D,derivedMode /derived major mode/
!_TAG_KIND_DESCRIPTION!EmacsLisp G,group /customization groups/
!_TAG_KIND_DESCRIPTION!EmacsLisp H,face /customizable faces/
!_TAG_KIND_DESCRIPTION!EmacsLisp M,minorMode /minor modes/
!_TAG_KIND_DESCRIPTION!EmacsLisp T,theme /custom themes/
!_TAG_KIND_DESCRIPTION!EmacsLisp V,varalias /aliases for variables/
!_TAG_KIND_DESCRIPTION!EmacsLisp a,alias /aliases for functions/
!_TAG_KIND_DESCRIPTION!EmacsLisp c,const /constants/
!_TAG_KIND_DESCRIPTION!EmacsLisp e,error /errors/
!_TAG_KIND_DESCRIPTION!EmacsLisp f,function /functions/
!_TAG_KIND_DESCRIPTION!EmacsLisp i,inline /inline function/
!_TAG_KIND_DESCRIPTION!EmacsLisp m,macro /macros/
!_TAG_KIND_DESCRIPTION!EmacsLisp s,subst /inline function/
!_TAG_KIND_DESCRIPTION!EmacsLisp u,unknown /unknown type of definitions/
!_TAG_KIND_DESCRIPTION!EmacsLisp v,variable /variables/
!_TAG_OUTPUT_FILESEP slash /slash or backslash/
!_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/
!_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/
!_TAG_PROGRAM_AUTHOR Universal Ctags Team //
!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/
!_TAG_PROGRAM_URL https://ctags.io/ /official site/
!_TAG_PROGRAM_VERSION 0.0.0 /9b73623f/
# -D + FILTER (-D)
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
!_TAG_KIND_DESCRIPTION!EmacsLisp C,custom /customizable variables/
!_TAG_KIND_DESCRIPTION!EmacsLisp D,derivedMode /derived major mode/
!_TAG_KIND_DESCRIPTION!EmacsLisp G,group /customization groups/
!_TAG_KIND_DESCRIPTION!EmacsLisp H,face /customizable faces/
!_TAG_KIND_DESCRIPTION!EmacsLisp M,minorMode /minor modes/
!_TAG_KIND_DESCRIPTION!EmacsLisp T,theme /custom themes/
!_TAG_KIND_DESCRIPTION!EmacsLisp V,varalias /aliases for variables/
!_TAG_KIND_DESCRIPTION!EmacsLisp a,alias /aliases for functions/
!_TAG_KIND_DESCRIPTION!EmacsLisp c,const /constants/
!_TAG_KIND_DESCRIPTION!EmacsLisp e,error /errors/
!_TAG_KIND_DESCRIPTION!EmacsLisp f,function /functions/
!_TAG_KIND_DESCRIPTION!EmacsLisp i,inline /inline function/
!_TAG_KIND_DESCRIPTION!EmacsLisp m,macro /macros/
!_TAG_KIND_DESCRIPTION!EmacsLisp s,subst /inline function/
!_TAG_KIND_DESCRIPTION!EmacsLisp u,unknown /unknown type of definitions/
!_TAG_KIND_DESCRIPTION!EmacsLisp v,variable /variables/
# -P -l + FILTER (-D)
!_JSON_OUTPUT_VERSION 0.0 /in development/
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
Expand Down Expand Up @@ -84,3 +231,4 @@
!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/
!_TAG_PROGRAM_URL https://ctags.io/ /official site/
!_TAG_PROGRAM_VERSION 0.0.0 /9b73623f/
main input.c /^int main (void) { return 0; }$/
1 change: 1 addition & 0 deletions Tmain/readtags-ptags-dls.d/exit-expected.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
Loading
Loading