PageRenderTime 35ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/bundles/plugins-trunk/RubyPlugin/src/org/jedit/ruby/test/TestYamlParser.java

#
Java | 155 lines | 128 code | 5 blank | 22 comment | 0 complexity | 47a4b536d4e2d8367d94152575a95e06 MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
  1. /*
  2. * TestYamlParser.java -
  3. *
  4. * Copyright 2005 Robert McKinnon
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License
  8. * as published by the Free Software Foundation; either version 2
  9. * of the License, or any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  19. */
  20. package org.jedit.ruby.test;
  21. import junit.framework.TestCase;
  22. import java.io.FileInputStream;
  23. import java.io.IOException;
  24. import java.util.jar.JarInputStream;
  25. import java.util.jar.JarEntry;
  26. import java.net.URL;
  27. /**
  28. * @author robmckinnon at users.sourceforge.net
  29. */
  30. public final class TestYamlParser extends TestCase {
  31. public final void testClassParsing() {
  32. assertTrue(true);
  33. }
  34. private static final String objectClass = "--- !ruby/object:RI::ClassDescription \n" +
  35. "attributes: []\n" +
  36. "class_methods: \n" +
  37. " - !ruby/object:RI::MethodDescription \n" +
  38. " name: new\n" +
  39. "comment: \n" +
  40. " - !ruby/struct:SM::Flow::P \n" +
  41. " body: \"<tt>Object</tt> is the parent class of all classes in Ruby. Its methods are\n" +
  42. " therefore available to all objects unless explicitly overridden.\"\n" +
  43. " - !ruby/struct:SM::Flow::P \n" +
  44. " body: \"<tt>Object</tt> mixes in the <tt>Kernel</tt> module, making the built-in kernel\n" +
  45. " functions globally accessible. Although the instance methods of <tt>Object</tt>\n" +
  46. " are defined by the <tt>Kernel</tt> module, we have chosen to document them here\n" +
  47. " for clarity.\"\n" +
  48. " - !ruby/struct:SM::Flow::P \n" +
  49. " body: \"In the descriptions of Object's methods, the parameter <em>symbol</em> refers to\n" +
  50. " a symbol, which is either a quoted string or a <tt>Symbol</tt> (such as\n" +
  51. " <tt>:name</tt>).\"\n" +
  52. "constants: []\n" +
  53. "full_name: Object\n" +
  54. "includes: \n" +
  55. " - !ruby/object:RI::IncludedModule \n" +
  56. " name: Kernel\n" +
  57. "instance_methods: \n" +
  58. " - !ruby/object:RI::MethodDescription \n" +
  59. " name: \"==\"\n" +
  60. " - !ruby/object:RI::MethodDescription \n" +
  61. " name: \"===\"\n" +
  62. " - !ruby/object:RI::MethodDescription \n" +
  63. " name: \"=~\"\n" +
  64. " - !ruby/object:RI::MethodDescription \n" +
  65. " name: \"__id__\"\n" +
  66. " - !ruby/object:RI::MethodDescription \n" +
  67. " name: \"__send__\"\n" +
  68. " - !ruby/object:RI::MethodDescription \n" +
  69. " name: class\n" +
  70. " - !ruby/object:RI::MethodDescription \n" +
  71. " name: clone\n" +
  72. " - !ruby/object:RI::MethodDescription \n" +
  73. " name: display\n" +
  74. " - !ruby/object:RI::MethodDescription \n" +
  75. " name: dup\n" +
  76. " - !ruby/object:RI::MethodDescription \n" +
  77. " name: \"eql?\"\n" +
  78. " - !ruby/object:RI::MethodDescription \n" +
  79. " name: \"equal?\"\n" +
  80. " - !ruby/object:RI::MethodDescription \n" +
  81. " name: extend\n" +
  82. " - !ruby/object:RI::MethodDescription \n" +
  83. " name: freeze\n" +
  84. " - !ruby/object:RI::MethodDescription \n" +
  85. " name: \"frozen?\"\n" +
  86. " - !ruby/object:RI::MethodDescription \n" +
  87. " name: hash\n" +
  88. " - !ruby/object:RI::MethodDescription \n" +
  89. " name: id\n" +
  90. " - !ruby/object:RI::MethodDescription \n" +
  91. " name: initialize_copy\n" +
  92. " - !ruby/object:RI::MethodDescription \n" +
  93. " name: inspect\n" +
  94. " - !ruby/object:RI::MethodDescription \n" +
  95. " name: instance_eval\n" +
  96. " - !ruby/object:RI::MethodDescription \n" +
  97. " name: \"instance_of?\"\n" +
  98. " - !ruby/object:RI::MethodDescription \n" +
  99. " name: instance_variable_get\n" +
  100. " - !ruby/object:RI::MethodDescription \n" +
  101. " name: instance_variable_set\n" +
  102. " - !ruby/object:RI::MethodDescription \n" +
  103. " name: instance_variables\n" +
  104. " - !ruby/object:RI::MethodDescription \n" +
  105. " name: \"is_a?\"\n" +
  106. " - !ruby/object:RI::MethodDescription \n" +
  107. " name: \"kind_of?\"\n" +
  108. " - !ruby/object:RI::MethodDescription \n" +
  109. " name: method\n" +
  110. " - !ruby/object:RI::MethodDescription \n" +
  111. " name: methods\n" +
  112. " - !ruby/object:RI::MethodDescription \n" +
  113. " name: \"nil?\"\n" +
  114. " - !ruby/object:RI::MethodDescription \n" +
  115. " name: object_id\n" +
  116. " - !ruby/object:RI::MethodDescription \n" +
  117. " name: private_methods\n" +
  118. " - !ruby/object:RI::MethodDescription \n" +
  119. " name: protected_methods\n" +
  120. " - !ruby/object:RI::MethodDescription \n" +
  121. " name: public_methods\n" +
  122. " - !ruby/object:RI::MethodDescription \n" +
  123. " name: remove_instance_variable\n" +
  124. " - !ruby/object:RI::MethodDescription \n" +
  125. " name: \"respond_to?\"\n" +
  126. " - !ruby/object:RI::MethodDescription \n" +
  127. " name: send\n" +
  128. " - !ruby/object:RI::MethodDescription \n" +
  129. " name: singleton_method_added\n" +
  130. " - !ruby/object:RI::MethodDescription \n" +
  131. " name: singleton_method_removed\n" +
  132. " - !ruby/object:RI::MethodDescription \n" +
  133. " name: singleton_method_undefined\n" +
  134. " - !ruby/object:RI::MethodDescription \n" +
  135. " name: singleton_methods\n" +
  136. " - !ruby/object:RI::MethodDescription \n" +
  137. " name: taint\n" +
  138. " - !ruby/object:RI::MethodDescription \n" +
  139. " name: \"tainted?\"\n" +
  140. " - !ruby/object:RI::MethodDescription \n" +
  141. " name: to_a\n" +
  142. " - !ruby/object:RI::MethodDescription \n" +
  143. " name: to_s\n" +
  144. " - !ruby/object:RI::MethodDescription \n" +
  145. " name: type\n" +
  146. " - !ruby/object:RI::MethodDescription \n" +
  147. " name: untaint\n" +
  148. "name: Object\n" +
  149. "superclass: ";
  150. }