xref: /Universal-ctags/Tmain/lregex-kind-letter.d/run.sh (revision b28506aa815e5e856d28cd6963a1d53f0513db8d)
1# Copyright: 2018 Masatake YAMATO
2# License: GPL-2
3
4CTAGS="$1 --quiet --options=NONE"
5
6. ../utils.sh
7
8echo2 param: '|(.)|\1|^ => ignoring'
9${CTAGS} --langdef=x --regex-x='|(.)|\1|^' --list-kinds-full=x
10# In this case, ctags ignores the substring after the last '|'.
11# It is evaluated as flags.
12
13echo2 param: '|(.)|\1|^| => warning'
14${CTAGS} --langdef=x --regex-x='|(.)|\1|^|' --list-kinds-full=x
15# In this case, ctags warns specifying a wrong kind letter '^'.
16
17echo2 param: '|(.)|\1|, => ignoring'
18${CTAGS} --langdef=x --regex-x='|(.)|\1|,' --list-kinds-full=x
19# In this case, ctags ignores the substring after the last '|'.
20# It is evaluated as flags.
21
22echo2 param: '|(.)|\1|,| => using the default letter and name'
23${CTAGS} --langdef=x --regex-x='|(.)|\1|,|' --list-kinds-full=x
24# In this case, ctags recognizes a kind letter and name
25# are not given; 'r' and "regex" are used as default values.
26