diff --git a/tests/ctags/Makefile.am b/tests/ctags/Makefile.am index 3f4bca22..0bc1c604 100644 --- a/tests/ctags/Makefile.am +++ b/tests/ctags/Makefile.am @@ -248,6 +248,7 @@ test_sources = \ test.vhd \ test_input.rs \ test_input2.rs \ + titles.t2t \ traffic_signal.v \ traits.php \ union.f \ diff --git a/tests/ctags/titles.t2t b/tests/ctags/titles.t2t new file mode 100644 index 00000000..79cfb110 --- /dev/null +++ b/tests/ctags/titles.t2t @@ -0,0 +1,40 @@ + +% from rules.t2t, with unique title content as our output removed +% duplicate tags (even with different scopes) + + +%%% Syntax: Balanced equal signs (from 1 to 5) += First Title Level 1 = +== First Title Level 2 == +=== First Title Level 3 === +==== First Title Level 4 ==== +===== First Title Level 5 ===== +%%% Label: Between brackets, alphanumeric [A-Za-z0-9_-] += Second Title Level 1 =[lab_el-1] +== Second Title Level 2 ==[lab_el-2] +=== Second Title Level 3 ===[lab_el-3] +==== Second Title Level 4 ====[lab_el-4] +===== Second Title Level 5 =====[lab_el-5] +%%% Syntax: Spaces around and/or inside are allowed (and ignored) + ===Third Title Level 3=== + === Fourth Title Level 3 === + === Fifth Title Level 3 === +=== Sixth Title Level 3 === +=== Seventh Title Level 3 === + === Eighth Title Level 3 ===[lab_el-9] +%%% Invalid: Unbalanced equal signs + =First Not Title + + ==Second Not Title= + + ===Third Not Title==== +%%% Invalid: Level deeper than 5 + ======First Not Title 6====== + +=======First Not Title 7======= +%%% Invalid: Space between title and label +=Fourth Not Title= [label1] +%%% Invalid: Space inside label +=Fifth Not Title=[ label ] +%%% Invalid: Strange chars inside label +=Sixth Not Title=[la/bel] diff --git a/tests/ctags/titles.t2t.tags b/tests/ctags/titles.t2t.tags new file mode 100644 index 00000000..185bb614 --- /dev/null +++ b/tests/ctags/titles.t2t.tags @@ -0,0 +1,17 @@ +# format=tagmanager +Eighth Title Level 3Ì64ÎSecond Title Level 1Second Title Level 2Ö0 +Fifth Title Level 3Ì64ÎSecond Title Level 1Second Title Level 2Ö0 +First Title Level 1Ì64Ö0 +First Title Level 2Ì64ÎFirst Title Level 1Ö0 +First Title Level 3Ì64ÎFirst Title Level 1First Title Level 2Ö0 +First Title Level 4Ì64ÎFirst Title Level 1First Title Level 2First Title Level 3Ö0 +First Title Level 5Ì64ÎFirst Title Level 1First Title Level 2First Title Level 3First Title Level 4Ö0 +Fourth Title Level 3Ì64ÎSecond Title Level 1Second Title Level 2Ö0 +Second Title Level 1Ì64Ö0 +Second Title Level 2Ì64ÎSecond Title Level 1Ö0 +Second Title Level 3Ì64ÎSecond Title Level 1Second Title Level 2Ö0 +Second Title Level 4Ì64ÎSecond Title Level 1Second Title Level 2Second Title Level 3Ö0 +Second Title Level 5Ì64ÎSecond Title Level 1Second Title Level 2Second Title Level 3Second Title Level 4Ö0 +Seventh Title Level 3Ì64ÎSecond Title Level 1Second Title Level 2Ö0 +Sixth Title Level 3Ì64ÎSecond Title Level 1Second Title Level 2Ö0 +Third Title Level 3Ì64ÎSecond Title Level 1Second Title Level 2Ö0