From 7c0456f91bee931f70bc3caa44102ebb2f8f610b Mon Sep 17 00:00:00 2001 From: Dmitri Gribenko Date: Wed, 1 Aug 2012 00:21:12 +0000 Subject: Comment to HTML conversion: escape HTML special characters in command arguments llvm-svn: 161094 --- clang/test/Index/annotate-comments.cpp | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) (limited to 'clang/test/Index/annotate-comments.cpp') diff --git a/clang/test/Index/annotate-comments.cpp b/clang/test/Index/annotate-comments.cpp index b1b72ff573e..60b8748f104 100644 --- a/clang/test/Index/annotate-comments.cpp +++ b/clang/test/Index/annotate-comments.cpp @@ -341,15 +341,18 @@ void comment_to_html_conversion_25(); /// \a Aaa \e Bbb \em Ccc void comment_to_html_conversion_26(); -/// \\ \@ \& \$ \# \< \> \% \" \. \:: +/// \a 1<2 \e 3<4 \em 5<6 \param 7<8 aaa \tparam 9<10 bbb void comment_to_html_conversion_27(); -/// & < > " +/// \\ \@ \& \$ \# \< \> \% \" \. \:: void comment_to_html_conversion_28(); -/// 0<i +/// & < > " void comment_to_html_conversion_29(); +/// 0<i +void comment_to_html_conversion_30(); + #endif // RUN: rm -rf %t @@ -706,7 +709,24 @@ void comment_to_html_conversion_29(); // CHECK-NEXT: (CXComment_InlineCommand CommandName=[e] RenderEmphasized Arg[0]=Bbb) // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace) // CHECK-NEXT: (CXComment_InlineCommand CommandName=[em] RenderEmphasized Arg[0]=Ccc)))] -// CHECK: annotate-comments.cpp:345:6: FunctionDecl=comment_to_html_conversion_27:{{.*}} FullCommentAsHTML=[

\ @ & $ # < > % " . ::

] +// CHECK: annotate-comments.cpp:345:6: FunctionDecl=comment_to_html_conversion_27:{{.*}} FullCommentAsHTML=[

1<2 3<4 5<6

9<10
bbb
7<8
aaa
] +// CHECK-NEXT: CommentAST=[ +// CHECK-NEXT: (CXComment_FullComment +// CHECK-NEXT: (CXComment_Paragraph +// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace) +// CHECK-NEXT: (CXComment_InlineCommand CommandName=[a] RenderEmphasized Arg[0]=1<2) +// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace) +// CHECK-NEXT: (CXComment_InlineCommand CommandName=[e] RenderEmphasized Arg[0]=3<4) +// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace) +// CHECK-NEXT: (CXComment_InlineCommand CommandName=[em] RenderEmphasized Arg[0]=5<6) +// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)) +// CHECK-NEXT: (CXComment_ParamCommand in implicitly ParamName=[7<8] ParamIndex=Invalid +// CHECK-NEXT: (CXComment_Paragraph +// CHECK-NEXT: (CXComment_Text Text=[ aaa ]))) +// CHECK-NEXT: (CXComment_TParamCommand ParamName=[9<10] ParamPosition=Invalid +// CHECK-NEXT: (CXComment_Paragraph +// CHECK-NEXT: (CXComment_Text Text=[ bbb]))))] +// CHECK: annotate-comments.cpp:348:6: FunctionDecl=comment_to_html_conversion_28:{{.*}} FullCommentAsHTML=[

\ @ & $ # < > % " . ::

] // CHECK-NEXT: CommentAST=[ // CHECK-NEXT: (CXComment_FullComment // CHECK-NEXT: (CXComment_Paragraph @@ -732,7 +752,7 @@ void comment_to_html_conversion_29(); // CHECK-NEXT: (CXComment_Text Text=[.]) // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace) // CHECK-NEXT: (CXComment_Text Text=[::])))] -// CHECK: annotate-comments.cpp:348:6: FunctionDecl=comment_to_html_conversion_28:{{.*}} FullCommentAsHTML=[

& < > "

] +// CHECK: annotate-comments.cpp:351:6: FunctionDecl=comment_to_html_conversion_29:{{.*}} FullCommentAsHTML=[

& < > "

] // CHECK-NEXT: CommentAST=[ // CHECK-NEXT: (CXComment_FullComment // CHECK-NEXT: (CXComment_Paragraph @@ -744,7 +764,7 @@ void comment_to_html_conversion_29(); // CHECK-NEXT: (CXComment_Text Text=[>]) // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace) // CHECK-NEXT: (CXComment_Text Text=["])))] -// CHECK: annotate-comments.cpp:351:6: FunctionDecl=comment_to_html_conversion_29:{{.*}} FullCommentAsHTML=[

0<i

] +// CHECK: annotate-comments.cpp:354:6: FunctionDecl=comment_to_html_conversion_30:{{.*}} FullCommentAsHTML=[

0<i

] // CHECK-NEXT: CommentAST=[ // CHECK-NEXT: (CXComment_FullComment // CHECK-NEXT: (CXComment_Paragraph -- cgit v1.2.3