diff options
author | Marko Klopcic <markok3.14@gmail.com> | 2013-03-17 21:42:22 +0100 |
---|---|---|
committer | Marko Klopcic <markok3.14@gmail.com> | 2013-03-17 21:42:22 +0100 |
commit | 02d0acfbb3625875bc8a4bd5c2ac3ed1e8459c5f (patch) | |
tree | 4d29942a6ce0d49a6e8e0296425fa2909a8acfb1 | |
parent | 4663fce63cc9a4a0222f80304f7acc15ed695c30 (diff) | |
download | swig-02d0acfbb3625875bc8a4bd5c2ac3ed1e8459c5f.tar.gz |
doxygen translation tests updated for tags 'anchor' and 'ref'
3 files changed, 30 insertions, 6 deletions
diff --git a/Examples/test-suite/java/CommentParser.java b/Examples/test-suite/java/CommentParser.java index 1d61f16b1..c8adc1d1e 100644 --- a/Examples/test-suite/java/CommentParser.java +++ b/Examples/test-suite/java/CommentParser.java @@ -56,10 +56,18 @@ public class CommentParser { actualStr = actualStr.replace(" ", ""); actualStr = actualStr.replaceAll("\t", ""); actualStr = actualStr.replace("\n", ""); + + // Removing of <br> is temporary solution, since adding of + // <br> tag requires changes in all tests. However, <br> + // tag should be added more selectively and when this is + // implemented, tests should be updated. + actualStr = actualStr.replace("<br>", ""); + if (wantedStr != null) { wantedStr = wantedStr.replace(" ", ""); wantedStr = wantedStr.replace("\t", ""); wantedStr = wantedStr.replace("\n", ""); + wantedStr = wantedStr.replace("<br>", ""); } /* The following lines replace multiple whitespaces with a single one. Although this would be more exact testing, it would also require @@ -92,7 +100,7 @@ public class CommentParser { // write translated string to file BufferedWriter gotFile = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(gotFileName))); - gotFile.write(e.getValue()); + gotFile.write(e.getValue().replace("<br>", "")); gotFile.close(); } catch (IOException ex) { System.out.println("Error when writing output to file: " + ex); diff --git a/Examples/test-suite/java/doxygen_translate_all_tags_runme.java b/Examples/test-suite/java/doxygen_translate_all_tags_runme.java index da05d51f6..8bd65224f 100644 --- a/Examples/test-suite/java/doxygen_translate_all_tags_runme.java +++ b/Examples/test-suite/java/doxygen_translate_all_tags_runme.java @@ -27,7 +27,8 @@ public class doxygen_translate_all_tags_runme { HashMap<String, String> wantedComments = new HashMap<String, String>(); wantedComments.put("doxygen_translate_all_tags.doxygen_translate_all_tags.func01(int)", - " <i>Hello </i>\n\n\n\n\n\n" + + " <i>Hello </i>\n\n\n" + + " <a id=\"theAnchor\"></a>\n\n\n" + " <li>some list item</li>\n\n" + " This is attention!\n" + " You were warned!\n" + @@ -113,9 +114,9 @@ public class doxygen_translate_all_tags_runme { wantedComments.put("doxygen_translate_all_tags.doxygen_translate_all_tags.func08(int)", "<a id=\"someAnchor\"></a>\n" + "Text after anchor.\n" + - "<a href="someAnchor">Anchor description</a>\n" + - "<a href="someAnchor">someAnchor</a>\n" + - "<a href="someAnchor">someAnchor</a>\n" + + "<a href=\"#someAnchor\">Anchor description</a>\n" + + "<a href=\"#someAnchor\">someAnchor</a> not quoted text is not part of ref tag\n" + + "<a href=\"#someAnchor\">someAnchor</a>\n" + " Remarks: Some remark text \n" + " Remarks: Another remarks section \n" + " @return Whatever \n" + diff --git a/Examples/test-suite/python/doxygen_translate_all_tags_runme.py b/Examples/test-suite/python/doxygen_translate_all_tags_runme.py index 65c74b2ba..053ebc7ec 100755 --- a/Examples/test-suite/python/doxygen_translate_all_tags_runme.py +++ b/Examples/test-suite/python/doxygen_translate_all_tags_runme.py @@ -232,9 +232,24 @@ commentVerifier.check(doxygen_translate_all_tags.func08.__doc__, r""" Text after anchor. + + + + + 'Anchor description' + + 'someAnchor' not quoted text is not part of ref tag + 'someAnchor' - 'someAnchor' + + + + + + + + Remarks: Some remark text |