Skip to content

Commit

Permalink
Merge pull request #1504 from masatake/man--tag-concept-code-only
Browse files Browse the repository at this point in the history
Misc changes mainly about --list-* options
  • Loading branch information
masatake committed Jul 6, 2017
2 parents 0645b2c + 75398ef commit b5c9b76
Show file tree
Hide file tree
Showing 53 changed files with 480 additions and 273 deletions.
1 change: 1 addition & 0 deletions Tmain/clear-aliases.d/exit-expected.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
21 changes: 21 additions & 0 deletions Tmain/clear-aliases.d/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright: 2017 Masatake YAMATO
# License: GPL-2

CTAGS=$1

echo '# clear' &&
${CTAGS} --quiet --options=NONE --alias-C= --with-list-header=no --list-aliases=C &&

echo '# add' &&
${CTAGS} --quiet --options=NONE --alias-Tcl=+abc --with-list-header=no --list-aliases=Tcl &&

echo '# reset' &&
${CTAGS} --quiet --options=NONE --alias-Tcl=+abc --alias-Tcl=default --with-list-header=no --list-aliases=Tcl

echo '# all clear' &&
${CTAGS} --quiet --options=NONE --alias-all= --with-list-header=no --list-aliases &&

echo '# all reset' &&
${CTAGS} --quiet --options=NONE --alias-Tcl=+abc --alias-all=default --with-list-header=no --list-aliases=Tcl

exit $?
9 changes: 9 additions & 0 deletions Tmain/clear-aliases.d/stdout-expected.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# clear
# add
expect
abc
# reset
expect
# all clear
# all reset
expect
2 changes: 1 addition & 1 deletion Tmain/enable-kind-postfix-with-wildcard.d/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# License: GPL-2

CTAGS=$1
${CTAGS} --quiet --options=NONE '--*-kinds=*' --list-kinds | grep '\[off\]'
${CTAGS} --quiet --options=NONE '--all-kinds=*' --list-kinds | grep '\[off\]'

2 changes: 1 addition & 1 deletion Tmain/enable-kind-prefix-with-wildcard.d/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# License: GPL-2

CTAGS=$1
${CTAGS} --quiet --options=NONE '--kinds-*=*' --list-kinds | grep '\[off\]'
${CTAGS} --quiet --options=NONE --kinds-all='*' --list-kinds | grep '\[off\]'

10 changes: 5 additions & 5 deletions Tmain/extras-long.d/stdout-expected.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ p pseudo no NONE Include pseudo tags
q qualified no NONE Include an extra class-qualified tag entry for each tag
r reference no NONE Include reference tags
s subparser yes NONE Include tags generated by subparsers
- funcmap yes QemuHX mapping SQMP to C function name
- funcmap yes QemuHX Include mapping SQMP to C function name
- whitespaceSwapped yes Robot Include tags swapping whitespace and underscore chars
# enabling 1
- subword no NONE Include tags for subwords generated by splitting the original tag (only for ctags development)
Expand All @@ -18,7 +18,7 @@ p pseudo yes NONE Include pseudo tags
q qualified no NONE Include an extra class-qualified tag entry for each tag
r reference no NONE Include reference tags
s subparser yes NONE Include tags generated by subparsers
- funcmap yes QemuHX mapping SQMP to C function name
- funcmap yes QemuHX Include mapping SQMP to C function name
- whitespaceSwapped yes Robot Include tags swapping whitespace and underscore chars
# disabling 1
- subword no NONE Include tags for subwords generated by splitting the original tag (only for ctags development)
Expand All @@ -29,7 +29,7 @@ p pseudo no NONE Include pseudo tags
q qualified no NONE Include an extra class-qualified tag entry for each tag
r reference no NONE Include reference tags
s subparser yes NONE Include tags generated by subparsers
- funcmap yes QemuHX mapping SQMP to C function name
- funcmap yes QemuHX Include mapping SQMP to C function name
- whitespaceSwapped yes Robot Include tags swapping whitespace and underscore chars
# combination
- subword no NONE Include tags for subwords generated by splitting the original tag (only for ctags development)
Expand All @@ -40,7 +40,7 @@ p pseudo no NONE Include pseudo tags
q qualified no NONE Include an extra class-qualified tag entry for each tag
r reference yes NONE Include reference tags
s subparser yes NONE Include tags generated by subparsers
- funcmap yes QemuHX mapping SQMP to C function name
- funcmap yes QemuHX Include mapping SQMP to C function name
- whitespaceSwapped yes Robot Include tags swapping whitespace and underscore chars
# combination with letters
- subword no NONE Include tags for subwords generated by splitting the original tag (only for ctags development)
Expand All @@ -51,5 +51,5 @@ p pseudo yes NONE Include pseudo tags
q qualified yes NONE Include an extra class-qualified tag entry for each tag
r reference yes NONE Include reference tags
s subparser yes NONE Include tags generated by subparsers
- funcmap yes QemuHX mapping SQMP to C function name
- funcmap yes QemuHX Include mapping SQMP to C function name
- whitespaceSwapped yes Robot Include tags swapping whitespace and underscore chars
3 changes: 1 addition & 2 deletions Tmain/input-encoding-option.d/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@ if ${CTAGS} --quiet --options=NONE --list-features | grep -q multibyte ; then
fi
exit $?
else
echo "multibyte feature is not available"
exit 77
skip "multibyte feature is not available"
fi
5 changes: 3 additions & 2 deletions Tmain/invalid-encoding-option.d/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@

CTAGS=$1

. ../utils.sh

if ${CTAGS} --quiet --options=NONE --list-features | grep -q multibyte ; then
${CTAGS} --quiet --options=NONE --input-encoding-java=invalid --input-encoding-javascript=euc-jp input.js input.java
exit $?
else
echo "multibyte feature is not available"
exit 77
skip "multibyte feature is not available"
fi
4 changes: 2 additions & 2 deletions Tmain/list-extras.d/stdout-expected.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ p pseudo yes NONE Include pseudo tags
q qualified yes NONE Include an extra class-qualified tag entry for each tag
r reference yes NONE Include reference tags
s subparser yes NONE Include tags generated by subparsers
- funcmap yes QemuHX mapping SQMP to C function name
- funcmap yes QemuHX Include mapping SQMP to C function name
- whitespaceSwapped yes Robot Include tags swapping whitespace and underscore chars
#LETTER NAME ENABLED LANGUAGE DESCRIPTION
- subword yes NONE Include tags for subwords generated by splitting the original tag (only for ctags development)
Expand All @@ -18,5 +18,5 @@ p pseudo yes NONE Include pseudo tags
q qualified yes NONE Include an extra class-qualified tag entry for each tag
r reference yes NONE Include reference tags
s subparser yes NONE Include tags generated by subparsers
- funcmap yes QemuHX mapping SQMP to C function name
- funcmap yes QemuHX Include mapping SQMP to C function name
- whitespaceSwapped yes Robot Include tags swapping whitespace and underscore chars
34 changes: 17 additions & 17 deletions Tmain/list-fields-with-prefix.d/stdout-expected.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
E UCTAGSextras no NONE yes s-- no Extra tag type information
Z UCTAGSscope no NONE yes s-- no Include the "scope:" key in scope field (use s) in tags output, scope name in xref output
e UCTAGSend no NONE yes -i- no end lines of various items
p UCTAGSscopeKind no NONE yes s-- no Kind of scope as full name
r UCTAGSrole no NONE yes s-- no Role
x UCTAGSxpath no NONE yes s-- no xpath for the tag
- UCTAGSproperties no C yes s-- no properties (static, inline, mutable,...)
- UCTAGScaptures no C++ yes s-- no lambda capture list
- UCTAGSname yes C++ yes s-- no aliased names
- UCTAGSproperties no C++ yes s-- no properties (static, inline, mutable,...)
- UCTAGStemplate no C++ yes s-- no template parameters
- UCTAGSproperties no CUDA yes s-- no properties (static, inline, mutable,...)
- UCTAGSassignment yes LdScript yes s-- no how a value is assigned to the symbol
- UCTAGSdecorators no Python yes s-- no decorators on functions and classes
- UCTAGShome yes passwd yes s-- no home directory
- UCTAGSshell yes passwd yes s-- no login shell
- UCTAGSsectionMarker no reStructuredText yes s-- no character used for declaring section
E UCTAGSextras no NONE s-- no Extra tag type information
Z UCTAGSscope no NONE s-- no Include the "scope:" key in scope field (use s) in tags output, scope name in xref output
e UCTAGSend no NONE -i- no end lines of various items
p UCTAGSscopeKind no NONE s-- no Kind of scope as full name
r UCTAGSrole no NONE s-- no Role
x UCTAGSxpath no NONE s-- no xpath for the tag
- UCTAGSproperties no C s-- no properties (static, inline, mutable,...)
- UCTAGScaptures no C++ s-- no lambda capture list
- UCTAGSname yes C++ s-- no aliased names
- UCTAGSproperties no C++ s-- no properties (static, inline, mutable,...)
- UCTAGStemplate no C++ s-- no template parameters
- UCTAGSproperties no CUDA s-- no properties (static, inline, mutable,...)
- UCTAGSassignment yes LdScript s-- no how a value is assigned to the symbol
- UCTAGSdecorators no Python s-- no decorators on functions and classes
- UCTAGShome yes passwd s-- no home directory
- UCTAGSshell yes passwd s-- no login shell
- UCTAGSsectionMarker no reStructuredText s-- no character used for declaring section
70 changes: 35 additions & 35 deletions Tmain/list-fields.d/stdout-expected.txt
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
#LETTER NAME ENABLED LANGUAGE XFMT JSTYPE FIXED DESCRIPTION
N name yes NONE yes s-- yes tag name
F input yes NONE yes s-- yes input file
P pattern yes NONE yes s-- yes pattern
C compact no NONE yes s-- no compact input line (used only in xref output)
E extras no NONE yes s-- no Extra tag type information
K NONE no NONE yes s-- no Kind of tag as full name
R NONE no NONE yes s-- no Marker (R or D) representing whether tag is definition or reference
S signature no NONE yes s-- no Signature of routine (e.g. prototype or parameter list)
Z scope no NONE yes s-- no Include the "scope:" key in scope field (use s) in tags output, scope name in xref output
a access no NONE yes s-- no Access (or export) of class members
e end no NONE yes -i- no end lines of various items
f file yes NONE yes --b no File-restricted scoping
i inherits no NONE yes s-b no Inheritance information
k NONE yes NONE yes s-- no Kind of tag as a single letter
l language no NONE yes s-- no Language of input file containing tag
m implementation no NONE yes s-- no Implementation information
n line no NONE yes -i- no Line number of tag definition
p scopeKind no NONE yes s-- no Kind of scope as full name
r role no NONE yes s-- no Role
s NONE yes NONE yes s-- no Scope of tag definition (`p' can be used for printing its kind)
t typeref yes NONE yes s-- no Type and name of a variable or typedef
x xpath no NONE yes s-- no xpath for the tag
z kind no NONE yes s-- no Include the "kind:" key in kind field (use k or K) in tags output, kind full name in xref output
- properties no C yes s-- no properties (static, inline, mutable,...)
- captures no C++ yes s-- no lambda capture list
- name yes C++ yes s-- no aliased names
- properties no C++ yes s-- no properties (static, inline, mutable,...)
- template no C++ yes s-- no template parameters
- properties no CUDA yes s-- no properties (static, inline, mutable,...)
- assignment yes LdScript yes s-- no how a value is assigned to the symbol
- decorators no Python yes s-- no decorators on functions and classes
- home yes passwd yes s-- no home directory
- shell yes passwd yes s-- no login shell
- sectionMarker no reStructuredText yes s-- no character used for declaring section
#LETTER NAME ENABLED LANGUAGE JSTYPE FIXED DESCRIPTION
N name yes NONE s-- yes tag name
F input yes NONE s-- yes input file
P pattern yes NONE s-- yes pattern
C compact no NONE s-- no compact input line (used only in xref output)
E extras no NONE s-- no Extra tag type information
K NONE no NONE s-- no Kind of tag as full name
R NONE no NONE s-- no Marker (R or D) representing whether tag is definition or reference
S signature no NONE s-- no Signature of routine (e.g. prototype or parameter list)
Z scope no NONE s-- no Include the "scope:" key in scope field (use s) in tags output, scope name in xref output
a access no NONE s-- no Access (or export) of class members
e end no NONE -i- no end lines of various items
f file yes NONE --b no File-restricted scoping
i inherits no NONE s-b no Inheritance information
k NONE yes NONE s-- no Kind of tag as a single letter
l language no NONE s-- no Language of input file containing tag
m implementation no NONE s-- no Implementation information
n line no NONE -i- no Line number of tag definition
p scopeKind no NONE s-- no Kind of scope as full name
r role no NONE s-- no Role
s NONE yes NONE s-- no Scope of tag definition (`p' can be used for printing its kind)
t typeref yes NONE s-- no Type and name of a variable or typedef
x xpath no NONE s-- no xpath for the tag
z kind no NONE s-- no Include the "kind:" key in kind field (use k or K) in tags output, kind full name in xref output
- properties no C s-- no properties (static, inline, mutable,...)
- captures no C++ s-- no lambda capture list
- name yes C++ s-- no aliased names
- properties no C++ s-- no properties (static, inline, mutable,...)
- template no C++ s-- no template parameters
- properties no CUDA s-- no properties (static, inline, mutable,...)
- assignment yes LdScript s-- no how a value is assigned to the symbol
- decorators no Python s-- no decorators on functions and classes
- home yes passwd s-- no home directory
- shell yes passwd s-- no login shell
- sectionMarker no reStructuredText s-- no character used for declaring section
#
Foo input.java /^abstract public class Foo extends Bar$/
x input.java /^ public int x;$/
Expand Down
4 changes: 2 additions & 2 deletions Tmain/list-language-fields.d/stdout-expected.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#LETTER NAME ENABLED LANGUAGE XFMT JSTYPE FIXED DESCRIPTION
- sectionMarker no reStructuredText yes s-- no character used for declaring section
#LETTER NAME ENABLED LANGUAGE JSTYPE FIXED DESCRIPTION
- sectionMarker no reStructuredText s-- no character used for declaring section
5 changes: 3 additions & 2 deletions Tmain/no-input-encoding-option.d/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

CTAGS=$1

. ../utils.sh

if ${CTAGS} --quiet --options=NONE --list-features | grep -q multibyte ; then
${CTAGS} --quiet --options=NONE --output-encoding=utf-8 input.js input.java
exit $?
else
echo "multibyte feature is not available"
exit 77
skip "multibyte feature is not available"
fi
1 change: 1 addition & 0 deletions Tmain/option-extras-enabling-all.d/exit-expected.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0
20 changes: 20 additions & 0 deletions Tmain/option-extras-enabling-all.d/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh
# Copyright: 2017 Masatake YAMATO
# License: GPL-2

CTAGS=$1

. ../utils.sh

column_for_enabled=

if ! column_for_enabled=$(get_column_index $CTAGS --list-extras "ENABLED"); then
exit $?
fi

$CTAGS --extras-all= \
--with-list-header=no --list-extras \
| filter_by_column_index $column_for_enabled | sort | uniq
$CTAGS --extras-all='*' \
--with-list-header=no --list-extras \
| filter_by_column_index $column_for_enabled | sort | uniq
Empty file.
2 changes: 2 additions & 0 deletions Tmain/option-extras-enabling-all.d/stdout-expected.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
no
yes
3 changes: 1 addition & 2 deletions Tmain/output-encoding-option.d/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ if ${CTAGS} --quiet --options=NONE --list-features | grep -q multibyte ; then
fi
exit $?
else
echo "multibyte feature is not available"
exit 77
skip "multibyte feature is not available"
fi
8 changes: 4 additions & 4 deletions Tmain/parser-own-extras.d/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ O="--quiet --options=NONE --with-list-header=no"
${CTAGS} --quiet --options=NONE --extras='*' --list-extras=Robot
${CTAGS} ${O} --extras-Robot=-'{whitespaceSwapped}' --list-extras=Robot
${CTAGS} ${O} --extras-Robot=-'{whitespaceSwapped}' --extras-Robot=+'{whitespaceSwapped}' --list-extras=Robot
${CTAGS} ${O} --extras-'*'=-'{whitespaceSwapped}' --list-extras=Robot
${CTAGS} ${O} --extras-'*'=-'{whitespaceSwapped}' --extras-'*'=+'{whitespaceSwapped}' --list-extras=Robot
${CTAGS} ${O} --extras-'*'=-'{whitespaceSwapped}' --extras-Robot=+'{whitespaceSwapped}' --list-extras=Robot
${CTAGS} ${O} --extras-Robot=-'{whitespaceSwapped}' --extras-'*'=+'{whitespaceSwapped}' --list-extras=Robot
${CTAGS} ${O} --extras-all=-'{whitespaceSwapped}' --list-extras=Robot
${CTAGS} ${O} --extras-all=-'{whitespaceSwapped}' --extras-all=+'{whitespaceSwapped}' --list-extras=Robot
${CTAGS} ${O} --extras-all=-'{whitespaceSwapped}' --extras-Robot=+'{whitespaceSwapped}' --list-extras=Robot
${CTAGS} ${O} --extras-Robot=-'{whitespaceSwapped}' --extras-all=+'{whitespaceSwapped}' --list-extras=Robot
4 changes: 2 additions & 2 deletions Tmain/parser-own-fields-clearing-all.d/stdout-expected.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# default
- assignment yes LdScript yes s-- no how a value is assigned to the symbol
- assignment yes LdScript s-- no how a value is assigned to the symbol
# clear all
- assignment no LdScript yes s-- no how a value is assigned to the symbol
- assignment no LdScript s-- no how a value is assigned to the symbol
8 changes: 4 additions & 4 deletions Tmain/readtags-qualifier-end-field.d/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@

READTAGS=$3

. ../utils.sh

#V="valgrind --leak-check=full -v"
V=

if ! [ -x "${READTAGS}" ]; then
echo "no readtags"
eixt 77
skip "no readtags"
fi

if ! ( "${READTAGS}" -h | grep -q -e -Q ); then
echo "no qualifier function in readtags"
exit 77
skip "no qualifier function in readtags"
fi

echo ';; (and $end (> $end 14) (< $end 18))' &&
Expand Down
8 changes: 4 additions & 4 deletions Tmain/readtags-qualifier.d/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@

READTAGS=$3

. ../utils.sh

#V="valgrind --leak-check=full -v"
V=

if ! [ -x "${READTAGS}" ]; then
echo "no readtags"
eixt 77
skip "no readtags"
fi

if ! ( "${READTAGS}" -h | grep -q -e -Q ); then
echo "no qualifier function in readtags"
exit 77
skip "no qualifier function in readtags"
fi

echo ';; (suffix? $name "q")' &&
Expand Down
5 changes: 3 additions & 2 deletions Tmain/sorted-help-message.d/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@

CTAGS=$1

. ../utils.sh

if ! sort --help | grep --quiet GNU; then
echo "GNU sort is needed to run this test case"
exit 77
skip "GNU sort is needed to run this test case"
fi

print_help()
Expand Down
7 changes: 3 additions & 4 deletions Tmain/sorted-list-languages.d/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
# License: GPL-2
CTAGS=$1

. ../utils.sh

if ! sort --help | grep --quiet GNU; then
echo "GNU sort is needed to run this test case"
exit 77
skip "GNU sort is needed to run this test case"
fi

list_languages()
Expand All @@ -18,5 +19,3 @@ diff -uN ./ll.tmp ./sorted-ll.tmp
r=$?
rm ./ll.tmp ./sorted-ll.tmp
exit $r


Loading

0 comments on commit b5c9b76

Please sign in to comment.