Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

my old solution of junit categories

  • Loading branch information...
commit 8ed4849ed0303579d808fb439b9b4f782312f746 1 parent 8648926
@Tibor17 authored
Showing with 25,602 additions and 0 deletions.
  1. +4 −0 junit.history/junit.git.categories02/build/.cvsignore
  2. +8 −0 junit.history/junit.git.categories02/build/.releaserc
  3. +1,450 −0 junit.history/junit.git.categories02/build/Markdown.pl
  4. +211 −0 junit.history/junit.git.categories02/build/github_upload.rb
  5. BIN  junit.history/junit.git.categories02/build/lib/ant-contrib-1.0b3.jar
  6. BIN  junit.history/junit.git.categories02/build/lib/commons-net-1.4.1.jar
  7. BIN  junit.history/junit.git.categories02/build/lib/jakarta-oro-2.0.8.jar
  8. BIN  junit.history/junit.git.categories02/build/lib/maven-ant-tasks-2.1.1.jar
  9. +13 −0 junit.history/junit.git.categories02/build/maven/junit-dep-pom-template.xml
  10. +68 −0 junit.history/junit.git.categories02/build/maven/junit-pom-template.xml
  11. +49 −0 junit.history/junit.git.categories02/build/maven/post_maven_tests.sh
  12. +61 −0 junit.history/junit.git.categories02/build/maven/sample_project_template/pom.xml
  13. +33 −0 ...t.history/junit.git.categories02/build/maven/sample_project_template/src/test/java/JunitDependencyTest.java
  14. +2 −0  junit.history/junit.git.categories02/build/profile_junit.sh
  15. +389 −0 junit.history/junit.git.categories02/build/release
  16. +36 −0 junit.history/junit.git.categories02/build/run_tests.sh
  17. +2 −0  junit.history/junit.git.categories02/build/upload_docs.sh
  18. +210 −0 junit.history/junit.git.categories02/junit.git.categories02.ipr
  19. +806 −0 junit.history/junit.git.categories02/junit.git.categories02.iws
  20. BIN  junit.history/junit.git.categories02/lib/hamcrest-core-1.1.jar
  21. +21 −0 junit.history/junit.git.categories02/src/main/Main.iml
  22. +70 −0 junit.history/junit.git.categories02/src/main/java/junit/extensions/ActiveTestSuite.java
  23. +38 −0 junit.history/junit.git.categories02/src/main/java/junit/extensions/RepeatedTest.java
  24. +43 −0 junit.history/junit.git.categories02/src/main/java/junit/extensions/TestDecorator.java
  25. +42 −0 junit.history/junit.git.categories02/src/main/java/junit/extensions/TestSetup.java
  26. +4 −0 junit.history/junit.git.categories02/src/main/java/junit/extensions/package-info.java
  27. +292 −0 junit.history/junit.git.categories02/src/main/java/junit/framework/Assert.java
  28. +20 −0 junit.history/junit.git.categories02/src/main/java/junit/framework/AssertionFailedError.java
  29. +72 −0 junit.history/junit.git.categories02/src/main/java/junit/framework/ComparisonCompactor.java
  30. +52 −0 junit.history/junit.git.categories02/src/main/java/junit/framework/ComparisonFailure.java
  31. +85 −0 junit.history/junit.git.categories02/src/main/java/junit/framework/JUnit4TestAdapter.java
  32. +81 −0 junit.history/junit.git.categories02/src/main/java/junit/framework/JUnit4TestAdapterCache.java
  33. +33 −0 junit.history/junit.git.categories02/src/main/java/junit/framework/JUnit4TestCaseFacade.java
  34. +14 −0 junit.history/junit.git.categories02/src/main/java/junit/framework/Protectable.java
  35. +17 −0 junit.history/junit.git.categories02/src/main/java/junit/framework/Test.java
  36. +212 −0 junit.history/junit.git.categories02/src/main/java/junit/framework/TestCase.java
  37. +58 −0 junit.history/junit.git.categories02/src/main/java/junit/framework/TestFailure.java
  38. +23 −0 junit.history/junit.git.categories02/src/main/java/junit/framework/TestListener.java
  39. +169 −0 junit.history/junit.git.categories02/src/main/java/junit/framework/TestResult.java
  40. +308 −0 junit.history/junit.git.categories02/src/main/java/junit/framework/TestSuite.java
  41. +4 −0 junit.history/junit.git.categories02/src/main/java/junit/framework/package-info.java
  42. +318 −0 junit.history/junit.git.categories02/src/main/java/junit/runner/BaseTestRunner.java
  43. +19 −0 junit.history/junit.git.categories02/src/main/java/junit/runner/TestRunListener.java
  44. +18 −0 junit.history/junit.git.categories02/src/main/java/junit/runner/Version.java
  45. +18 −0 junit.history/junit.git.categories02/src/main/java/junit/runner/Version.java.template
  46. BIN  junit.history/junit.git.categories02/src/main/java/junit/runner/logo.gif
  47. +4 −0 junit.history/junit.git.categories02/src/main/java/junit/runner/package-info.java
  48. BIN  junit.history/junit.git.categories02/src/main/java/junit/runner/smalllogo.gif
  49. +139 −0 junit.history/junit.git.categories02/src/main/java/junit/textui/ResultPrinter.java
  50. +203 −0 junit.history/junit.git.categories02/src/main/java/junit/textui/TestRunner.java
  51. +4 −0 junit.history/junit.git.categories02/src/main/java/junit/textui/package-info.java
  52. +41 −0 junit.history/junit.git.categories02/src/main/java/org/junit/After.java
  53. +42 −0 junit.history/junit.git.categories02/src/main/java/org/junit/AfterClass.java
  54. +979 −0 junit.history/junit.git.categories02/src/main/java/org/junit/Assert.java
  55. +95 −0 junit.history/junit.git.categories02/src/main/java/org/junit/Assume.java
  56. +40 −0 junit.history/junit.git.categories02/src/main/java/org/junit/Before.java
  57. +36 −0 junit.history/junit.git.categories02/src/main/java/org/junit/BeforeClass.java
  58. +87 −0 junit.history/junit.git.categories02/src/main/java/org/junit/ClassRule.java
  59. +139 −0 junit.history/junit.git.categories02/src/main/java/org/junit/ComparisonFailure.java
  60. +42 −0 junit.history/junit.git.categories02/src/main/java/org/junit/FixMethodOrder.java
  61. +40 −0 junit.history/junit.git.categories02/src/main/java/org/junit/Ignore.java
  62. +71 −0 junit.history/junit.git.categories02/src/main/java/org/junit/Rule.java
  63. +69 −0 junit.history/junit.git.categories02/src/main/java/org/junit/Test.java
  64. +78 −0 junit.history/junit.git.categories02/src/main/java/org/junit/experimental/ParallelComputer.java
  65. +425 −0 junit.history/junit.git.categories02/src/main/java/org/junit/experimental/categories/Categories.java
  66. +192 −0 junit.history/junit.git.categories02/src/main/java/org/junit/experimental/categories/Categories.java.bak
  67. +44 −0 junit.history/junit.git.categories02/src/main/java/org/junit/experimental/categories/Category.java
  68. +43 −0 junit.history/junit.git.categories02/src/main/java/org/junit/experimental/categories/Category.java.bak
  69. +28 −0 junit.history/junit.git.categories02/src/main/java/org/junit/experimental/categories/Selection.java
  70. +15 −0 junit.history/junit.git.categories02/src/main/java/org/junit/experimental/max/CouldNotReadCoreException.java
  71. +170 −0 junit.history/junit.git.categories02/src/main/java/org/junit/experimental/max/MaxCore.java
  72. +166 −0 junit.history/junit.git.categories02/src/main/java/org/junit/experimental/max/MaxHistory.java
  73. +31 −0 junit.history/junit.git.categories02/src/main/java/org/junit/experimental/results/FailureList.java
  74. +63 −0 junit.history/junit.git.categories02/src/main/java/org/junit/experimental/results/PrintableResult.java
  75. +70 −0 junit.history/junit.git.categories02/src/main/java/org/junit/experimental/results/ResultMatchers.java
  76. +31 −0 junit.history/junit.git.categories02/src/main/java/org/junit/experimental/runners/Enclosed.java
  77. +9 −0 junit.history/junit.git.categories02/src/main/java/org/junit/experimental/theories/DataPoint.java
  78. +9 −0 junit.history/junit.git.categories02/src/main/java/org/junit/experimental/theories/DataPoints.java
  79. +90 −0 junit.history/junit.git.categories02/src/main/java/org/junit/experimental/theories/ParameterSignature.java
  80. +8 −0 junit.history/junit.git.categories02/src/main/java/org/junit/experimental/theories/ParameterSupplier.java
  81. +12 −0 junit.history/junit.git.categories02/src/main/java/org/junit/experimental/theories/ParametersSuppliedBy.java
  82. +31 −0 junit.history/junit.git.categories02/src/main/java/org/junit/experimental/theories/PotentialAssignment.java
  83. +199 −0 junit.history/junit.git.categories02/src/main/java/org/junit/experimental/theories/Theories.java
  84. +12 −0 junit.history/junit.git.categories02/src/main/java/org/junit/experimental/theories/Theory.java
  85. +127 −0 ...story/junit.git.categories02/src/main/java/org/junit/experimental/theories/internal/AllMembersSupplier.java
  86. +133 −0 junit.history/junit.git.categories02/src/main/java/org/junit/experimental/theories/internal/Assignments.java
  87. +49 −0 ...it.git.categories02/src/main/java/org/junit/experimental/theories/internal/ParameterizedAssertionError.java
  88. +13 −0 junit.history/junit.git.categories02/src/main/java/org/junit/experimental/theories/suppliers/TestedOn.java
  89. +20 −0 ...istory/junit.git.categories02/src/main/java/org/junit/experimental/theories/suppliers/TestedOnSupplier.java
  90. +59 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/ArrayComparisonFailure.java
  91. +40 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/AssumptionViolatedException.java
  92. +76 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/ComparisonCriteria.java
  93. +10 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/ExactComparisonCriteria.java
  94. +23 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/InexactComparisonCriteria.java
  95. +7 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/JUnitSystem.java
  96. +69 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/MethodSorter.java
  97. +10 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/RealSystem.java
  98. +98 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/TextListener.java
  99. +57 −0 ...istory/junit.git.categories02/src/main/java/org/junit/internal/builders/AllDefaultPossibilitiesBuilder.java
  100. +45 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/builders/AnnotatedBuilder.java
  101. +17 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/builders/IgnoredBuilder.java
  102. +26 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/builders/IgnoredClassRunner.java
  103. +21 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/builders/JUnit3Builder.java
  104. +15 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/builders/JUnit4Builder.java
  105. +14 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/builders/NullBuilder.java
  106. +26 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/builders/SuiteMethodBuilder.java
  107. +22 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/matchers/CauseMatcher.java
  108. +34 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/matchers/CombinableMatcher.java
  109. +24 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/matchers/Each.java
  110. +67 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/matchers/IsCollectionContaining.java
  111. +31 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/matchers/StringContains.java
  112. +28 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/matchers/SubstringMatcher.java
  113. +61 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/matchers/TypeSafeMatcher.java
  114. +32 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/requests/ClassRequest.java
  115. +42 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/requests/FilterRequest.java
  116. +25 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/requests/SortingRequest.java
  117. +6 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/requests/package-info.java
  118. +79 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/runners/ClassRoadie.java
  119. +60 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/runners/ErrorReportingRunner.java
  120. +14 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/runners/FailedBefore.java
  121. +30 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/runners/InitializationError.java
  122. +158 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/runners/JUnit38ClassRunner.java
  123. +145 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/runners/JUnit4ClassRunner.java
  124. +157 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/runners/MethodRoadie.java
  125. +91 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/runners/MethodValidator.java
  126. +40 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/runners/SuiteMethod.java
  127. +103 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/runners/TestClass.java
  128. +69 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/runners/TestMethod.java
  129. +51 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/runners/model/EachTestNotifier.java
  130. +12 −0 ...history/junit.git.categories02/src/main/java/org/junit/internal/runners/model/MultipleFailureException.java
  131. +22 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/runners/model/ReflectiveCallable.java
  132. +6 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/runners/package-info.java
  133. +112 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/runners/rules/RuleFieldValidator.java
  134. +38 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/runners/statements/ExpectException.java
  135. +17 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/runners/statements/Fail.java
  136. +84 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/runners/statements/FailOnTimeout.java
  137. +22 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/runners/statements/InvokeMethod.java
  138. +43 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/runners/statements/RunAfters.java
  139. +30 −0 junit.history/junit.git.categories02/src/main/java/org/junit/internal/runners/statements/RunBefores.java
  140. +93 −0 junit.history/junit.git.categories02/src/main/java/org/junit/matchers/JUnitMatchers.java
  141. +9 −0 junit.history/junit.git.categories02/src/main/java/org/junit/matchers/package-info.java
  142. +8 −0 junit.history/junit.git.categories02/src/main/java/org/junit/package-info.java
  143. +83 −0 junit.history/junit.git.categories02/src/main/java/org/junit/rules/ErrorCollector.java
  144. +230 −0 junit.history/junit.git.categories02/src/main/java/org/junit/rules/ExpectedException.java
  145. +69 −0 junit.history/junit.git.categories02/src/main/java/org/junit/rules/ExternalResource.java
  146. +43 −0 junit.history/junit.git.categories02/src/main/java/org/junit/rules/MethodRule.java
  147. +97 −0 junit.history/junit.git.categories02/src/main/java/org/junit/rules/RuleChain.java
  148. +28 −0 junit.history/junit.git.categories02/src/main/java/org/junit/rules/RunRules.java
  149. +138 −0 junit.history/junit.git.categories02/src/main/java/org/junit/rules/TemporaryFolder.java
  150. +40 −0 junit.history/junit.git.categories02/src/main/java/org/junit/rules/TestName.java
  151. +55 −0 junit.history/junit.git.categories02/src/main/java/org/junit/rules/TestRule.java
  152. +95 −0 junit.history/junit.git.categories02/src/main/java/org/junit/rules/TestWatcher.java
  153. +101 −0 junit.history/junit.git.categories02/src/main/java/org/junit/rules/TestWatchman.java
  154. +47 −0 junit.history/junit.git.categories02/src/main/java/org/junit/rules/Timeout.java
  155. +46 −0 junit.history/junit.git.categories02/src/main/java/org/junit/rules/Verifier.java
  156. +41 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runner/Computer.java
  157. +13 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runner/Describable.java
  158. +259 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runner/Description.java
  159. +181 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runner/JUnitCore.java
  160. +162 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runner/Request.java
  161. +106 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runner/Result.java
  162. +35 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runner/RunWith.java
  163. +41 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runner/Runner.java
  164. +115 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runner/manipulation/Filter.java
  165. +17 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runner/manipulation/Filterable.java
  166. +9 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runner/manipulation/NoTestsRemainException.java
  167. +18 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runner/manipulation/Sortable.java
  168. +46 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runner/manipulation/Sorter.java
  169. +7 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runner/manipulation/package-info.java
  170. +80 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runner/notification/Failure.java
  171. +94 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runner/notification/RunListener.java
  172. +192 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runner/notification/RunNotifier.java
  173. +12 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runner/notification/StoppedByUserException.java
  174. +6 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runner/notification/package-info.java
  175. +6 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runner/package-info.java
  176. +25 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runners/AllTests.java
  177. +420 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runners/BlockJUnit4ClassRunner.java
  178. +23 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runners/JUnit4.java
  179. +36 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runners/MethodSorters.java
  180. +227 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runners/Parameterized.java
  181. +385 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runners/ParentRunner.java
  182. +131 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runners/Suite.java
  183. +70 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runners/model/FrameworkField.java
  184. +30 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runners/model/FrameworkMember.java
  185. +189 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runners/model/FrameworkMethod.java
  186. +40 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runners/model/InitializationError.java
  187. +61 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runners/model/MultipleFailureException.java
  188. +53 −0 ....history/junit.git.categories02/src/main/java/org/junit/runners/model/NoGenericTypeParametersValidator.java
  189. +105 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runners/model/RunnerBuilder.java
  190. +22 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runners/model/RunnerScheduler.java
  191. +14 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runners/model/Statement.java
  192. +177 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runners/model/TestClass.java
  193. +8 −0 junit.history/junit.git.categories02/src/main/java/org/junit/runners/package-info.java
  194. +22 −0 junit.history/junit.git.categories02/src/test/Test.iml
  195. +22 −0 junit.history/junit.git.categories02/src/test/java/junit/samples/AllTests.java
  196. +63 −0 junit.history/junit.git.categories02/src/test/java/junit/samples/ListTest.java
  197. +68 −0 junit.history/junit.git.categories02/src/test/java/junit/samples/SimpleTest.java
  198. +45 −0 junit.history/junit.git.categories02/src/test/java/junit/samples/money/IMoney.java
  199. +78 −0 junit.history/junit.git.categories02/src/test/java/junit/samples/money/Money.java
  200. +124 −0 junit.history/junit.git.categories02/src/test/java/junit/samples/money/MoneyBag.java
  201. +143 −0 junit.history/junit.git.categories02/src/test/java/junit/samples/money/MoneyTest.java
  202. +4 −0 junit.history/junit.git.categories02/src/test/java/junit/samples/money/package-info.java
  203. +4 −0 junit.history/junit.git.categories02/src/test/java/junit/samples/package-info.java
  204. +23 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/AllTests.java
  205. +15 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/WasRun.java
  206. +64 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/extensions/ActiveTestTest.java
  207. +23 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/extensions/AllTests.java
  208. +98 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/extensions/ExtensionTest.java
  209. +63 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/extensions/RepeatedTestTest.java
  210. +4 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/extensions/package-info.java
  211. +32 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/framework/AllTests.java
  212. +171 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/framework/AssertTest.java
  213. +23 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/framework/AssertionFailedErrorTest.java
  214. +102 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/framework/ComparisonCompactorTest.java
  215. +47 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/framework/ComparisonFailureTest.java
  216. +55 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/framework/DoublePrecisionAssertTest.java
  217. +14 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/framework/Failure.java
  218. +63 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/framework/FloatAssertTest.java
  219. +9 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/framework/InheritedTestCase.java
  220. +9 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/framework/NoArgTestCaseTest.java
  221. +10 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/framework/NoTestCaseClass.java
  222. +11 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/framework/NoTestCases.java
  223. +13 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/framework/NotPublicTestCase.java
  224. +14 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/framework/NotVoidTestCase.java
  225. +15 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/framework/OneTestCase.java
  226. +10 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/framework/OverrideTestCase.java
  227. +17 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/framework/Success.java
  228. +105 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/framework/SuiteTest.java
  229. +190 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/framework/TestCaseTest.java
  230. +54 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/framework/TestImplementorTest.java
  231. +73 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/framework/TestListenerTest.java
  232. +15 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/framework/ThreeTestCases.java
  233. +4 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/framework/package-info.java
  234. +4 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/package-info.java
  235. +31 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/runner/AllTests.java
  236. +53 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/runner/BaseTestRunnerTest.java
  237. +37 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/runner/ResultTest.java
  238. +46 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/runner/StackFilterTest.java
  239. +109 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/runner/TextFeedbackTest.java
  240. +39 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/runner/TextRunnerSingleMethodTest.java
  241. +61 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/runner/TextRunnerTest.java
  242. +4 −0 junit.history/junit.git.categories02/src/test/java/junit/tests/runner/package-info.java
  243. +96 −0 junit.history/junit.git.categories02/src/test/java/org/junit/internal/MethodSorterTest.java
  244. +49 −0 junit.history/junit.git.categories02/src/test/java/org/junit/runner/notification/RunNotifierTest.java
  245. +77 −0 junit.history/junit.git.categories02/src/test/java/org/junit/samples/ListTest.java
  246. +41 −0 junit.history/junit.git.categories02/src/test/java/org/junit/samples/SimpleTest.java
  247. +158 −0 junit.history/junit.git.categories02/src/test/java/org/junit/samples/money/MoneyTest.java
  248. +7 −0 junit.history/junit.git.categories02/src/test/java/org/junit/samples/money/package-info.java
  249. +6 −0 junit.history/junit.git.categories02/src/test/java/org/junit/samples/package-info.java
  250. +173 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/AllTests.java
  251. +46 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/ObjectContractTest.java
  252. +26 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/TestSystem.java
  253. +586 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/assertion/AssertionTest.java
  254. +71 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/assertion/BothTest.java
  255. +18 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/assertion/CauseMatcherTest.java
  256. +13 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/assertion/EachTest.java
  257. +60 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/assertion/MultipleFailureExceptionTest.java
  258. +54 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/deprecated/JUnit4ClassRunnerTest.java
  259. +96 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/description/AnnotatedDescriptionTest.java
  260. +35 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/description/SuiteDescriptionTest.java
  261. +22 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/description/TestDescriptionTest.java
  262. +177 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/experimental/AssumptionTest.java
  263. +52 −0 ...tory/junit.git.categories02/src/test/java/org/junit/tests/experimental/AssumptionViolatedExceptionTest.java
  264. +28 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/experimental/ExperimentalTests.java
  265. +43 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/experimental/MatcherTest.java
  266. +126 −0 ....git.categories02/src/test/java/org/junit/tests/experimental/categories/CategoriesAndParameterizedTest.java
  267. +93 −0 ...ies02/src/test/java/org/junit/tests/experimental/categories/CategoriesConfiguredBySystemPropertiesTest.java
  268. +490 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/experimental/categories/CategoryTest.java
  269. +254 −0 ....history/junit.git.categories02/src/test/java/org/junit/tests/experimental/categories/CategoryTest.java.tmp
  270. +172 −0 ...history/junit.git.categories02/src/test/java/org/junit/tests/experimental/categories/MultiCategoryTest.java
  271. +28 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/experimental/max/DescriptionTest.java
  272. +53 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/experimental/max/JUnit38SortingTest.java
  273. +293 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/experimental/max/MaxStarterTest.java
  274. +54 −0 ...t.history/junit.git.categories02/src/test/java/org/junit/tests/experimental/parallel/ParallelClassTest.java
  275. +44 −0 ....history/junit.git.categories02/src/test/java/org/junit/tests/experimental/parallel/ParallelMethodTest.java
  276. +51 −0 ....history/junit.git.categories02/src/test/java/org/junit/tests/experimental/results/PrintableResultTest.java
  277. +21 −0 ...t.history/junit.git.categories02/src/test/java/org/junit/tests/experimental/results/ResultMatchersTest.java
  278. +93 −0 ...t.git.categories02/src/test/java/org/junit/tests/experimental/rules/BlockJUnit4ClassRunnerOverrideTest.java
  279. +237 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/experimental/rules/ClassRulesTest.java
  280. +175 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/experimental/rules/EventCollector.java
  281. +384 −0 ....history/junit.git.categories02/src/test/java/org/junit/tests/experimental/rules/ExpectedExceptionTest.java
  282. +37 −0 ...story/junit.git.categories02/src/test/java/org/junit/tests/experimental/rules/ExternalResourceRuleTest.java
  283. +32 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/experimental/rules/LoggingTestWatcher.java
  284. +275 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/experimental/rules/MethodRulesTest.java
  285. +50 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/experimental/rules/NameRulesTest.java
  286. +60 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/experimental/rules/RuleChainTest.java
  287. +189 −0 ...history/junit.git.categories02/src/test/java/org/junit/tests/experimental/rules/RuleFieldValidatorTest.java
  288. +239 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/experimental/rules/TempFolderRuleTest.java
  289. +161 −0 ...story/junit.git.categories02/src/test/java/org/junit/tests/experimental/rules/TemporaryFolderUsageTest.java
  290. +653 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/experimental/rules/TestRuleTest.java
  291. +52 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/experimental/rules/TestWatcherTest.java
  292. +72 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/experimental/rules/TestWatchmanTest.java
  293. +39 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/experimental/rules/TimeoutRuleTest.java
  294. +133 −0 junit.history/junit.git.categories02/src/test/java/org/junit/tests/experimental/rules/VerifierRuleTest.java
  295. +34 −0 ...tory/junit.git.categories02/src/test/java/org/junit/tests/experimental/theories/AllMembersSupplierTest.java
  296. +57 −0 ...tory/junit.git.categories02/src/test/java/org/junit/tests/experimental/theories/ParameterSignatureTest.java
  297. +75 −0 ...t.git.categories02/src/test/java/org/junit/tests/experimental/theories/ParameterizedAssertionErrorTest.java
  298. +32 −0 ...istory/junit.git.categories02/src/test/java/org/junit/tests/experimental/theories/TestedOnSupplierTest.java
  299. +7 −0 ....git.categories02/src/test/java/org/junit/tests/experimental/theories/extendingwithstubs/Correspondent.java
  300. +122 −0 .../junit.git.categories02/src/test/java/org/junit/tests/experimental/theories/extendingwithstubs/Guesser.java
Sorry, we could not display the entire diff because too many files (362) changed.
View
4 junit.history/junit.git.categories02/build/.cvsignore
@@ -0,0 +1,4 @@
+Changes
+java.hprof.txt
+historical_javadoc
+compare_with_44.sh
View
8 junit.history/junit.git.categories02/build/.releaserc
@@ -0,0 +1,8 @@
+sf_user = dsaff
+sf_group_id = 15278
+sf_package_id = 226053
+cpan_user = <none>
+sf_release_match = junit-(.*).jar
+sf_release_replace = $1
+sf_type_id = 2601
+sf_processor_id = 8500
View
1,450 junit.history/junit.git.categories02/build/Markdown.pl
@@ -0,0 +1,1450 @@
+#!/usr/bin/perl
+
+#
+# Markdown -- A text-to-HTML conversion tool for web writers
+#
+# Copyright (c) 2004 John Gruber
+# <http://daringfireball.net/projects/markdown/>
+#
+
+
+package Markdown;
+require 5.006_000;
+use strict;
+use warnings;
+
+use Digest::MD5 qw(md5_hex);
+use vars qw($VERSION);
+$VERSION = '1.0.1';
+# Tue 14 Dec 2004
+
+## Disabled; causes problems under Perl 5.6.1:
+# use utf8;
+# binmode( STDOUT, ":utf8" ); # c.f.: http://acis.openlib.org/dev/perl-unicode-struggle.html
+
+
+#
+# Global default settings:
+#
+my $g_empty_element_suffix = " />"; # Change to ">" for HTML output
+my $g_tab_width = 4;
+
+
+#
+# Globals:
+#
+
+# Regex to match balanced [brackets]. See Friedl's
+# "Mastering Regular Expressions", 2nd Ed., pp. 328-331.
+my $g_nested_brackets;
+$g_nested_brackets = qr{
+ (?> # Atomic matching
+ [^\[\]]+ # Anything other than brackets
+ |
+ \[
+ (??{ $g_nested_brackets }) # Recursive set of nested brackets
+ \]
+ )*
+}x;
+
+
+# Table of hash values for escaped characters:
+my %g_escape_table;
+foreach my $char (split //, '\\`*_{}[]()>#+-.!') {
+ $g_escape_table{$char} = md5_hex($char);
+}
+
+
+# Global hashes, used by various utility routines
+my %g_urls;
+my %g_titles;
+my %g_html_blocks;
+
+# Used to track when we're inside an ordered or unordered list
+# (see _ProcessListItems() for details):
+my $g_list_level = 0;
+
+
+#### Blosxom plug-in interface ##########################################
+
+# Set $g_blosxom_use_meta to 1 to use Blosxom's meta plug-in to determine
+# which posts Markdown should process, using a "meta-markup: markdown"
+# header. If it's set to 0 (the default), Markdown will process all
+# entries.
+my $g_blosxom_use_meta = 0;
+
+sub start { 1; }
+sub story {
+ my($pkg, $path, $filename, $story_ref, $title_ref, $body_ref) = @_;
+
+ if ( (! $g_blosxom_use_meta) or
+ (defined($meta::markup) and ($meta::markup =~ /^\s*markdown\s*$/i))
+ ){
+ $$body_ref = Markdown($$body_ref);
+ }
+ 1;
+}
+
+
+#### Movable Type plug-in interface #####################################
+eval {require MT}; # Test to see if we're running in MT.
+unless ($@) {
+ require MT;
+ import MT;
+ require MT::Template::Context;
+ import MT::Template::Context;
+
+ eval {require MT::Plugin}; # Test to see if we're running >= MT 3.0.
+ unless ($@) {
+ require MT::Plugin;
+ import MT::Plugin;
+ my $plugin = new MT::Plugin({
+ name => "Markdown",
+ description => "A plain-text-to-HTML formatting plugin. (Version: $VERSION)",
+ doc_link => 'http://daringfireball.net/projects/markdown/'
+ });
+ MT->add_plugin( $plugin );
+ }
+
+ MT::Template::Context->add_container_tag(MarkdownOptions => sub {
+ my $ctx = shift;
+ my $args = shift;
+ my $builder = $ctx->stash('builder');
+ my $tokens = $ctx->stash('tokens');
+
+ if (defined ($args->{'output'}) ) {
+ $ctx->stash('markdown_output', lc $args->{'output'});
+ }
+
+ defined (my $str = $builder->build($ctx, $tokens) )
+ or return $ctx->error($builder->errstr);
+ $str; # return value
+ });
+
+ MT->add_text_filter('markdown' => {
+ label => 'Markdown',
+ docs => 'http://daringfireball.net/projects/markdown/',
+ on_format => sub {
+ my $text = shift;
+ my $ctx = shift;
+ my $raw = 0;
+ if (defined $ctx) {
+ my $output = $ctx->stash('markdown_output');
+ if (defined $output && $output =~ m/^html/i) {
+ $g_empty_element_suffix = ">";
+ $ctx->stash('markdown_output', '');
+ }
+ elsif (defined $output && $output eq 'raw') {
+ $raw = 1;
+ $ctx->stash('markdown_output', '');
+ }
+ else {
+ $raw = 0;
+ $g_empty_element_suffix = " />";
+ }
+ }
+ $text = $raw ? $text : Markdown($text);
+ $text;
+ },
+ });
+
+ # If SmartyPants is loaded, add a combo Markdown/SmartyPants text filter:
+ my $smartypants;
+
+ {
+ no warnings "once";
+ $smartypants = $MT::Template::Context::Global_filters{'smarty_pants'};
+ }
+
+ if ($smartypants) {
+ MT->add_text_filter('markdown_with_smartypants' => {
+ label => 'Markdown With SmartyPants',
+ docs => 'http://daringfireball.net/projects/markdown/',
+ on_format => sub {
+ my $text = shift;
+ my $ctx = shift;
+ if (defined $ctx) {
+ my $output = $ctx->stash('markdown_output');
+ if (defined $output && $output eq 'html') {
+ $g_empty_element_suffix = ">";
+ }
+ else {
+ $g_empty_element_suffix = " />";
+ }
+ }
+ $text = Markdown($text);
+ $text = $smartypants->($text, '1');
+ },
+ });
+ }
+}
+else {
+#### BBEdit/command-line text filter interface ##########################
+# Needs to be hidden from MT (and Blosxom when running in static mode).
+
+ # We're only using $blosxom::version once; tell Perl not to warn us:
+ no warnings 'once';
+ unless ( defined($blosxom::version) ) {
+ use warnings;
+
+ #### Check for command-line switches: #################
+ my %cli_opts;
+ use Getopt::Long;
+ Getopt::Long::Configure('pass_through');
+ GetOptions(\%cli_opts,
+ 'version',
+ 'shortversion',
+ 'html4tags',
+ );
+ if ($cli_opts{'version'}) { # Version info
+ print "\nThis is Markdown, version $VERSION.\n";
+ print "Copyright 2004 John Gruber\n";
+ print "http://daringfireball.net/projects/markdown/\n\n";
+ exit 0;
+ }
+ if ($cli_opts{'shortversion'}) { # Just the version number string.
+ print $VERSION;
+ exit 0;
+ }
+ if ($cli_opts{'html4tags'}) { # Use HTML tag style instead of XHTML
+ $g_empty_element_suffix = ">";
+ }
+
+
+ #### Process incoming text: ###########################
+ my $text;
+ {
+ local $/; # Slurp the whole file
+ $text = <>;
+ }
+ print Markdown($text);
+ }
+}
+
+
+
+sub Markdown {
+#
+# Main function. The order in which other subs are called here is
+# essential. Link and image substitutions need to happen before
+# _EscapeSpecialChars(), so that any *'s or _'s in the <a>
+# and <img> tags get encoded.
+#
+ my $text = shift;
+
+ # Clear the global hashes. If we don't clear these, you get conflicts
+ # from other articles when generating a page which contains more than
+ # one article (e.g. an index page that shows the N most recent
+ # articles):
+ %g_urls = ();
+ %g_titles = ();
+ %g_html_blocks = ();
+
+
+ # Standardize line endings:
+ $text =~ s{\r\n}{\n}g; # DOS to Unix
+ $text =~ s{\r}{\n}g; # Mac to Unix
+
+ # Make sure $text ends with a couple of newlines:
+ $text .= "\n\n";
+
+ # Convert all tabs to spaces.
+ $text = _Detab($text);
+
+ # Strip any lines consisting only of spaces and tabs.
+ # This makes subsequent regexen easier to write, because we can
+ # match consecutive blank lines with /\n+/ instead of something
+ # contorted like /[ \t]*\n+/ .
+ $text =~ s/^[ \t]+$//mg;
+
+ # Turn block-level HTML blocks into hash entries
+ $text = _HashHTMLBlocks($text);
+
+ # Strip link definitions, store in hashes.
+ $text = _StripLinkDefinitions($text);
+
+ $text = _RunBlockGamut($text);
+
+ $text = _UnescapeSpecialChars($text);
+
+ return $text . "\n";
+}
+
+
+sub _StripLinkDefinitions {
+#
+# Strips link definitions from text, stores the URLs and titles in
+# hash references.
+#
+ my $text = shift;
+ my $less_than_tab = $g_tab_width - 1;
+
+ # Link defs are in the form: ^[id]: url "optional title"
+ while ($text =~ s{
+ ^[ ]{0,$less_than_tab}\[(.+)\]: # id = $1
+ [ \t]*
+ \n? # maybe *one* newline
+ [ \t]*
+ <?(\S+?)>? # url = $2
+ [ \t]*
+ \n? # maybe one newline
+ [ \t]*
+ (?:
+ (?<=\s) # lookbehind for whitespace
+ ["(]
+ (.+?) # title = $3
+ [")]
+ [ \t]*
+ )? # title is optional
+ (?:\n+|\Z)
+ }
+ {}mx) {
+ $g_urls{lc $1} = _EncodeAmpsAndAngles( $2 ); # Link IDs are case-insensitive
+ if ($3) {
+ $g_titles{lc $1} = $3;
+ $g_titles{lc $1} =~ s/"/&quot;/g;
+ }
+ }
+
+ return $text;
+}
+
+
+sub _HashHTMLBlocks {
+ my $text = shift;
+ my $less_than_tab = $g_tab_width - 1;
+
+ # Hashify HTML blocks:
+ # We only want to do this for block-level HTML tags, such as headers,
+ # lists, and tables. That's because we still want to wrap <p>s around
+ # "paragraphs" that are wrapped in non-block-level tags, such as anchors,
+ # phrase emphasis, and spans. The list of tags we're looking for is
+ # hard-coded:
+ my $block_tags_a = qr/p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del/;
+ my $block_tags_b = qr/p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math/;
+
+ # First, look for nested blocks, e.g.:
+ # <div>
+ # <div>
+ # tags for inner block must be indented.
+ # </div>
+ # </div>
+ #
+ # The outermost tags must start at the left margin for this to match, and
+ # the inner nested divs must be indented.
+ # We need to do this before the next, more liberal match, because the next
+ # match will start at the first `<div>` and stop at the first `</div>`.
+ $text =~ s{
+ ( # save in $1
+ ^ # start of line (with /m)
+ <($block_tags_a) # start tag = $2
+ \b # word break
+ (.*\n)*? # any number of lines, minimally matching
+ </\2> # the matching end tag
+ [ \t]* # trailing spaces/tabs
+ (?=\n+|\Z) # followed by a newline or end of document
+ )
+ }{
+ my $key = md5_hex($1);
+ $g_html_blocks{$key} = $1;
+ "\n\n" . $key . "\n\n";
+ }egmx;
+
+
+ #
+ # Now match more liberally, simply from `\n<tag>` to `</tag>\n`
+ #
+ $text =~ s{
+ ( # save in $1
+ ^ # start of line (with /m)
+ <($block_tags_b) # start tag = $2
+ \b # word break
+ (.*\n)*? # any number of lines, minimally matching
+ .*</\2> # the matching end tag
+ [ \t]* # trailing spaces/tabs
+ (?=\n+|\Z) # followed by a newline or end of document
+ )
+ }{
+ my $key = md5_hex($1);
+ $g_html_blocks{$key} = $1;
+ "\n\n" . $key . "\n\n";
+ }egmx;
+ # Special case just for <hr />. It was easier to make a special case than
+ # to make the other regex more complicated.
+ $text =~ s{
+ (?:
+ (?<=\n\n) # Starting after a blank line
+ | # or
+ \A\n? # the beginning of the doc
+ )
+ ( # save in $1
+ [ ]{0,$less_than_tab}
+ <(hr) # start tag = $2
+ \b # word break
+ ([^<>])*? #
+ /?> # the matching end tag
+ [ \t]*
+ (?=\n{2,}|\Z) # followed by a blank line or end of document
+ )
+ }{
+ my $key = md5_hex($1);
+ $g_html_blocks{$key} = $1;
+ "\n\n" . $key . "\n\n";
+ }egx;
+
+ # Special case for standalone HTML comments:
+ $text =~ s{
+ (?:
+ (?<=\n\n) # Starting after a blank line
+ | # or
+ \A\n? # the beginning of the doc
+ )
+ ( # save in $1
+ [ ]{0,$less_than_tab}
+ (?s:
+ <!
+ (--.*?--\s*)+
+ >
+ )
+ [ \t]*
+ (?=\n{2,}|\Z) # followed by a blank line or end of document
+ )
+ }{
+ my $key = md5_hex($1);
+ $g_html_blocks{$key} = $1;
+ "\n\n" . $key . "\n\n";
+ }egx;
+
+
+ return $text;
+}
+
+
+sub _RunBlockGamut {
+#
+# These are all the transformations that form block-level
+# tags like paragraphs, headers, and list items.
+#
+ my $text = shift;
+
+ $text = _DoHeaders($text);
+
+ # Do Horizontal Rules:
+ $text =~ s{^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$}{\n<hr$g_empty_element_suffix\n}gmx;
+ $text =~ s{^[ ]{0,2}([ ]? -[ ]?){3,}[ \t]*$}{\n<hr$g_empty_element_suffix\n}gmx;
+ $text =~ s{^[ ]{0,2}([ ]? _[ ]?){3,}[ \t]*$}{\n<hr$g_empty_element_suffix\n}gmx;
+
+ $text = _DoLists($text);
+
+ $text = _DoCodeBlocks($text);
+
+ $text = _DoBlockQuotes($text);
+
+ # We already ran _HashHTMLBlocks() before, in Markdown(), but that
+ # was to escape raw HTML in the original Markdown source. This time,
+ # we're escaping the markup we've just created, so that we don't wrap
+ # <p> tags around block-level tags.
+ $text = _HashHTMLBlocks($text);
+
+ $text = _FormParagraphs($text);
+
+ return $text;
+}
+
+
+sub _RunSpanGamut {
+#
+# These are all the transformations that occur *within* block-level
+# tags like paragraphs, headers, and list items.
+#
+ my $text = shift;
+
+ $text = _DoCodeSpans($text);
+
+ $text = _EscapeSpecialChars($text);
+
+ # Process anchor and image tags. Images must come first,
+ # because ![foo][f] looks like an anchor.
+ $text = _DoImages($text);
+ $text = _DoAnchors($text);
+
+ # Make links out of things like `<http://example.com/>`
+ # Must come after _DoAnchors(), because you can use < and >
+ # delimiters in inline links like [this](<url>).
+ $text = _DoAutoLinks($text);
+
+ $text = _EncodeAmpsAndAngles($text);
+
+ $text = _DoItalicsAndBold($text);
+
+ # Do hard breaks:
+ $text =~ s/ {2,}\n/ <br$g_empty_element_suffix\n/g;
+
+ return $text;
+}
+
+
+sub _EscapeSpecialChars {
+ my $text = shift;
+ my $tokens ||= _TokenizeHTML($text);
+
+ $text = ''; # rebuild $text from the tokens
+# my $in_pre = 0; # Keep track of when we're inside <pre> or <code> tags.
+# my $tags_to_skip = qr!<(/?)(?:pre|code|kbd|script|math)[\s>]!;
+
+ foreach my $cur_token (@$tokens) {
+ if ($cur_token->[0] eq "tag") {
+ # Within tags, encode * and _ so they don't conflict
+ # with their use in Markdown for italics and strong.
+ # We're replacing each such character with its
+ # corresponding MD5 checksum value; this is likely
+ # overkill, but it should prevent us from colliding
+ # with the escape values by accident.
+ $cur_token->[1] =~ s! \* !$g_escape_table{'*'}!gx;
+ $cur_token->[1] =~ s! _ !$g_escape_table{'_'}!gx;
+ $text .= $cur_token->[1];
+ } else {
+ my $t = $cur_token->[1];
+ $t = _EncodeBackslashEscapes($t);
+ $text .= $t;
+ }
+ }
+ return $text;
+}
+
+
+sub _DoAnchors {
+#
+# Turn Markdown link shortcuts into XHTML <a> tags.
+#
+ my $text = shift;
+
+ #
+ # First, handle reference-style links: [link text] [id]
+ #
+ $text =~ s{
+ ( # wrap whole match in $1
+ \[
+ ($g_nested_brackets) # link text = $2
+ \]
+
+ [ ]? # one optional space
+ (?:\n[ ]*)? # one optional newline followed by spaces
+
+ \[
+ (.*?) # id = $3
+ \]
+ )
+ }{
+ my $result;
+ my $whole_match = $1;
+ my $link_text = $2;
+ my $link_id = lc $3;
+
+ if ($link_id eq "") {
+ $link_id = lc $link_text; # for shortcut links like [this][].
+ }
+
+ if (defined $g_urls{$link_id}) {
+ my $url = $g_urls{$link_id};
+ $url =~ s! \* !$g_escape_table{'*'}!gx; # We've got to encode these to avoid
+ $url =~ s! _ !$g_escape_table{'_'}!gx; # conflicting with italics/bold.
+ $result = "<a href=\"$url\"";
+ if ( defined $g_titles{$link_id} ) {
+ my $title = $g_titles{$link_id};
+ $title =~ s! \* !$g_escape_table{'*'}!gx;
+ $title =~ s! _ !$g_escape_table{'_'}!gx;
+ $result .= " title=\"$title\"";
+ }
+ $result .= ">$link_text</a>";
+ }
+ else {
+ $result = $whole_match;
+ }
+ $result;
+ }xsge;
+
+ #
+ # Next, inline-style links: [link text](url "optional title")
+ #
+ $text =~ s{
+ ( # wrap whole match in $1
+ \[
+ ($g_nested_brackets) # link text = $2
+ \]
+ \( # literal paren
+ [ \t]*
+ <?(.*?)>? # href = $3
+ [ \t]*
+ ( # $4
+ (['"]) # quote char = $5
+ (.*?) # Title = $6
+ \5 # matching quote
+ )? # title is optional
+ \)
+ )
+ }{
+ my $result;
+ my $whole_match = $1;
+ my $link_text = $2;
+ my $url = $3;
+ my $title = $6;
+
+ $url =~ s! \* !$g_escape_table{'*'}!gx; # We've got to encode these to avoid
+ $url =~ s! _ !$g_escape_table{'_'}!gx; # conflicting with italics/bold.
+ $result = "<a href=\"$url\"";
+
+ if (defined $title) {
+ $title =~ s/"/&quot;/g;
+ $title =~ s! \* !$g_escape_table{'*'}!gx;
+ $title =~ s! _ !$g_escape_table{'_'}!gx;
+ $result .= " title=\"$title\"";
+ }
+
+ $result .= ">$link_text</a>";
+
+ $result;
+ }xsge;
+
+ return $text;
+}
+
+
+sub _DoImages {
+#
+# Turn Markdown image shortcuts into <img> tags.
+#
+ my $text = shift;
+
+ #
+ # First, handle reference-style labeled images: ![alt text][id]
+ #
+ $text =~ s{
+ ( # wrap whole match in $1
+ !\[
+ (.*?) # alt text = $2
+ \]
+
+ [ ]? # one optional space
+ (?:\n[ ]*)? # one optional newline followed by spaces
+
+ \[
+ (.*?) # id = $3
+ \]
+
+ )
+ }{
+ my $result;
+ my $whole_match = $1;
+ my $alt_text = $2;
+ my $link_id = lc $3;
+
+ if ($link_id eq "") {
+ $link_id = lc $alt_text; # for shortcut links like ![this][].
+ }
+
+ $alt_text =~ s/"/&quot;/g;
+ if (defined $g_urls{$link_id}) {
+ my $url = $g_urls{$link_id};
+ $url =~ s! \* !$g_escape_table{'*'}!gx; # We've got to encode these to avoid
+ $url =~ s! _ !$g_escape_table{'_'}!gx; # conflicting with italics/bold.
+ $result = "<img src=\"$url\" alt=\"$alt_text\"";
+ if (defined $g_titles{$link_id}) {
+ my $title = $g_titles{$link_id};
+ $title =~ s! \* !$g_escape_table{'*'}!gx;
+ $title =~ s! _ !$g_escape_table{'_'}!gx;
+ $result .= " title=\"$title\"";
+ }
+ $result .= $g_empty_element_suffix;
+ }
+ else {
+ # If there's no such link ID, leave intact:
+ $result = $whole_match;
+ }
+
+ $result;
+ }xsge;
+
+ #
+ # Next, handle inline images: ![alt text](url "optional title")
+ # Don't forget: encode * and _
+
+ $text =~ s{
+ ( # wrap whole match in $1
+ !\[
+ (.*?) # alt text = $2
+ \]
+ \( # literal paren
+ [ \t]*
+ <?(\S+?)>? # src url = $3
+ [ \t]*
+ ( # $4
+ (['"]) # quote char = $5
+ (.*?) # title = $6
+ \5 # matching quote
+ [ \t]*
+ )? # title is optional
+ \)
+ )
+ }{
+ my $result;
+ my $whole_match = $1;
+ my $alt_text = $2;
+ my $url = $3;
+ my $title = '';
+ if (defined($6)) {
+ $title = $6;
+ }
+
+ $alt_text =~ s/"/&quot;/g;
+ $title =~ s/"/&quot;/g;
+ $url =~ s! \* !$g_escape_table{'*'}!gx; # We've got to encode these to avoid
+ $url =~ s! _ !$g_escape_table{'_'}!gx; # conflicting with italics/bold.
+ $result = "<img src=\"$url\" alt=\"$alt_text\"";
+ if (defined $title) {
+ $title =~ s! \* !$g_escape_table{'*'}!gx;
+ $title =~ s! _ !$g_escape_table{'_'}!gx;
+ $result .= " title=\"$title\"";
+ }
+ $result .= $g_empty_element_suffix;
+
+ $result;
+ }xsge;
+
+ return $text;
+}
+
+
+sub _DoHeaders {
+ my $text = shift;
+
+ # Setext-style headers:
+ # Header 1
+ # ========
+ #
+ # Header 2
+ # --------
+ #
+ $text =~ s{ ^(.+)[ \t]*\n=+[ \t]*\n+ }{
+ "<h1>" . _RunSpanGamut($1) . "</h1>\n\n";
+ }egmx;
+
+ $text =~ s{ ^(.+)[ \t]*\n-+[ \t]*\n+ }{
+ "<h2>" . _RunSpanGamut($1) . "</h2>\n\n";
+ }egmx;
+
+
+ # atx-style headers:
+ # # Header 1
+ # ## Header 2
+ # ## Header 2 with closing hashes ##
+ # ...
+ # ###### Header 6
+ #
+ $text =~ s{
+ ^(\#{1,6}) # $1 = string of #'s
+ [ \t]*
+ (.+?) # $2 = Header text
+ [ \t]*
+ \#* # optional closing #'s (not counted)
+ \n+
+ }{
+ my $h_level = length($1);
+ "<h$h_level>" . _RunSpanGamut($2) . "</h$h_level>\n\n";
+ }egmx;
+
+ return $text;
+}
+
+
+sub _DoLists {
+#
+# Form HTML ordered (numbered) and unordered (bulleted) lists.
+#
+ my $text = shift;
+ my $less_than_tab = $g_tab_width - 1;
+
+ # Re-usable patterns to match list item bullets and number markers:
+ my $marker_ul = qr/[*+-]/;
+ my $marker_ol = qr/\d+[.]/;
+ my $marker_any = qr/(?:$marker_ul|$marker_ol)/;
+
+ # Re-usable pattern to match any entirel ul or ol list:
+ my $whole_list = qr{
+ ( # $1 = whole list
+ ( # $2
+ [ ]{0,$less_than_tab}
+ (${marker_any}) # $3 = first list item marker
+ [ \t]+
+ )
+ (?s:.+?)
+ ( # $4
+ \z
+ |
+ \n{2,}
+ (?=\S)
+ (?! # Negative lookahead for another list item marker
+ [ \t]*
+ ${marker_any}[ \t]+
+ )
+ )
+ )
+ }mx;
+
+ # We use a different prefix before nested lists than top-level lists.
+ # See extended comment in _ProcessListItems().
+ #
+ # Note: There's a bit of duplication here. My original implementation
+ # created a scalar regex pattern as the conditional result of the test on
+ # $g_list_level, and then only ran the $text =~ s{...}{...}egmx
+ # substitution once, using the scalar as the pattern. This worked,
+ # everywhere except when running under MT on my hosting account at Pair
+ # Networks. There, this caused all rebuilds to be killed by the reaper (or
+ # perhaps they crashed, but that seems incredibly unlikely given that the
+ # same script on the same server ran fine *except* under MT. I've spent
+ # more time trying to figure out why this is happening than I'd like to
+ # admit. My only guess, backed up by the fact that this workaround works,
+ # is that Perl optimizes the substition when it can figure out that the
+ # pattern will never change, and when this optimization isn't on, we run
+ # afoul of the reaper. Thus, the slightly redundant code to that uses two
+ # static s/// patterns rather than one conditional pattern.
+
+ if ($g_list_level) {
+ $text =~ s{
+ ^
+ $whole_list
+ }{
+ my $list = $1;
+ my $list_type = ($3 =~ m/$marker_ul/) ? "ul" : "ol";
+ # Turn double returns into triple returns, so that we can make a
+ # paragraph for the last item in a list, if necessary:
+ $list =~ s/\n{2,}/\n\n\n/g;
+ my $result = _ProcessListItems($list, $marker_any);
+ $result = "<$list_type>\n" . $result . "</$list_type>\n";
+ $result;
+ }egmx;
+ }
+ else {
+ $text =~ s{
+ (?:(?<=\n\n)|\A\n?)
+ $whole_list
+ }{
+ my $list = $1;
+ my $list_type = ($3 =~ m/$marker_ul/) ? "ul" : "ol";
+ # Turn double returns into triple returns, so that we can make a
+ # paragraph for the last item in a list, if necessary:
+ $list =~ s/\n{2,}/\n\n\n/g;
+ my $result = _ProcessListItems($list, $marker_any);
+ $result = "<$list_type>\n" . $result . "</$list_type>\n";
+ $result;
+ }egmx;
+ }
+
+
+ return $text;
+}
+
+
+sub _ProcessListItems {
+#
+# Process the contents of a single ordered or unordered list, splitting it
+# into individual list items.
+#
+
+ my $list_str = shift;
+ my $marker_any = shift;
+
+
+ # The $g_list_level global keeps track of when we're inside a list.
+ # Each time we enter a list, we increment it; when we leave a list,
+ # we decrement. If it's zero, we're not in a list anymore.
+ #
+ # We do this because when we're not inside a list, we want to treat
+ # something like this:
+ #
+ # I recommend upgrading to version
+ # 8. Oops, now this line is treated
+ # as a sub-list.
+ #
+ # As a single paragraph, despite the fact that the second line starts
+ # with a digit-period-space sequence.
+ #
+ # Whereas when we're inside a list (or sub-list), that line will be
+ # treated as the start of a sub-list. What a kludge, huh? This is
+ # an aspect of Markdown's syntax that's hard to parse perfectly
+ # without resorting to mind-reading. Perhaps the solution is to
+ # change the syntax rules such that sub-lists must start with a
+ # starting cardinal number; e.g. "1." or "a.".
+
+ $g_list_level++;
+
+ # trim trailing blank lines:
+ $list_str =~ s/\n{2,}\z/\n/;
+
+
+ $list_str =~ s{
+ (\n)? # leading line = $1
+ (^[ \t]*) # leading whitespace = $2
+ ($marker_any) [ \t]+ # list marker = $3
+ ((?s:.+?) # list item text = $4
+ (\n{1,2}))
+ (?= \n* (\z | \2 ($marker_any) [ \t]+))
+ }{
+ my $item = $4;
+ my $leading_line = $1;
+ my $leading_space = $2;
+
+ if ($leading_line or ($item =~ m/\n{2,}/)) {
+ $item = _RunBlockGamut(_Outdent($item));
+ }
+ else {
+ # Recursion for sub-lists:
+ $item = _DoLists(_Outdent($item));
+ chomp $item;
+ $item = _RunSpanGamut($item);
+ }
+
+ "<li>" . $item . "</li>\n";
+ }egmx;
+
+ $g_list_level--;
+ return $list_str;
+}
+
+
+
+sub _DoCodeBlocks {
+#
+# Process Markdown `<pre><code>` blocks.
+#
+
+ my $text = shift;
+
+ $text =~ s{
+ (?:\n\n|\A)
+ ( # $1 = the code block -- one or more lines, starting with a space/tab
+ (?:
+ (?:[ ]{$g_tab_width} | \t) # Lines must start with a tab or a tab-width of spaces
+ .*\n+
+ )+
+ )
+ ((?=^[ ]{0,$g_tab_width}\S)|\Z) # Lookahead for non-space at line-start, or end of doc
+ }{
+ my $codeblock = $1;
+ my $result; # return value
+
+ $codeblock = _EncodeCode(_Outdent($codeblock));
+ $codeblock = _Detab($codeblock);
+ $codeblock =~ s/\A\n+//; # trim leading newlines
+ $codeblock =~ s/\s+\z//; # trim trailing whitespace
+
+ $result = "\n\n<pre><code>" . $codeblock . "\n</code></pre>\n\n";
+
+ $result;
+ }egmx;
+
+ return $text;
+}
+
+
+sub _DoCodeSpans {
+#
+# * Backtick quotes are used for <code></code> spans.
+#
+# * You can use multiple backticks as the delimiters if you want to
+# include literal backticks in the code span. So, this input:
+#
+# Just type ``foo `bar` baz`` at the prompt.
+#
+# Will translate to:
+#
+# <p>Just type <code>foo `bar` baz</code> at the prompt.</p>
+#
+# There's no arbitrary limit to the number of backticks you
+# can use as delimters. If you need three consecutive backticks
+# in your code, use four for delimiters, etc.
+#
+# * You can use spaces to get literal backticks at the edges:
+#
+# ... type `` `bar` `` ...
+#
+# Turns to:
+#
+# ... type <code>`bar`</code> ...
+#
+
+ my $text = shift;
+
+ $text =~ s@
+ (`+) # $1 = Opening run of `
+ (.+?) # $2 = The code block
+ (?<!`)
+ \1 # Matching closer
+ (?!`)
+ @
+ my $c = "$2";
+ $c =~ s/^[ \t]*//g; # leading whitespace
+ $c =~ s/[ \t]*$//g; # trailing whitespace
+ $c = _EncodeCode($c);
+ "<code>$c</code>";
+ @egsx;
+
+ return $text;
+}
+
+
+sub _EncodeCode {
+#
+# Encode/escape certain characters inside Markdown code runs.
+# The point is that in code, these characters are literals,
+# and lose their special Markdown meanings.
+#
+ local $_ = shift;
+
+ # Encode all ampersands; HTML entities are not
+ # entities within a Markdown code span.
+ s/&/&amp;/g;
+
+ # Encode $'s, but only if we're running under Blosxom.
+ # (Blosxom interpolates Perl variables in article bodies.)
+ {
+ no warnings 'once';
+ if (defined($blosxom::version)) {
+ s/\$/&#036;/g;
+ }
+ }
+
+
+ # Do the angle bracket song and dance:
+ s! < !&lt;!gx;
+ s! > !&gt;!gx;
+
+ # Now, escape characters that are magic in Markdown:
+ s! \* !$g_escape_table{'*'}!gx;
+ s! _ !$g_escape_table{'_'}!gx;
+ s! { !$g_escape_table{'{'}!gx;
+ s! } !$g_escape_table{'}'}!gx;
+ s! \[ !$g_escape_table{'['}!gx;
+ s! \] !$g_escape_table{']'}!gx;
+ s! \\ !$g_escape_table{'\\'}!gx;
+
+ return $_;
+}
+
+
+sub _DoItalicsAndBold {
+ my $text = shift;
+
+ # <strong> must go first:
+ $text =~ s{ (\*\*|__) (?=\S) (.+?[*_]*) (?<=\S) \1 }
+ {<strong>$2</strong>}gsx;
+
+ $text =~ s{ (\*|_) (?=\S) (.+?) (?<=\S) \1 }
+ {<em>$2</em>}gsx;
+
+ return $text;
+}
+
+
+sub _DoBlockQuotes {
+ my $text = shift;
+
+ $text =~ s{
+ ( # Wrap whole match in $1
+ (
+ ^[ \t]*>[ \t]? # '>' at the start of a line
+ .+\n # rest of the first line
+ (.+\n)* # subsequent consecutive lines
+ \n* # blanks
+ )+
+ )
+ }{
+ my $bq = $1;
+ $bq =~ s/^[ \t]*>[ \t]?//gm; # trim one level of quoting
+ $bq =~ s/^[ \t]+$//mg; # trim whitespace-only lines
+ $bq = _RunBlockGamut($bq); # recurse
+
+ $bq =~ s/^/ /g;
+ # These leading spaces screw with <pre> content, so we need to fix that:
+ $bq =~ s{
+ (\s*<pre>.+?</pre>)
+ }{
+ my $pre = $1;
+ $pre =~ s/^ //mg;
+ $pre;
+ }egsx;
+
+ "<blockquote>\n$bq\n</blockquote>\n\n";
+ }egmx;
+
+
+ return $text;
+}
+
+
+sub _FormParagraphs {
+#
+# Params:
+# $text - string to process with html <p> tags
+#
+ my $text = shift;
+
+ # Strip leading and trailing lines:
+ $text =~ s/\A\n+//;
+ $text =~ s/\n+\z//;
+
+ my @grafs = split(/\n{2,}/, $text);
+
+ #
+ # Wrap <p> tags.
+ #
+ foreach (@grafs) {
+ unless (defined( $g_html_blocks{$_} )) {
+ $_ = _RunSpanGamut($_);
+ s/^([ \t]*)/<p>/;
+ $_ .= "</p>";
+ }
+ }
+
+ #
+ # Unhashify HTML blocks
+ #
+ foreach (@grafs) {
+ if (defined( $g_html_blocks{$_} )) {
+ $_ = $g_html_blocks{$_};
+ }
+ }
+
+ return join "\n\n", @grafs;
+}
+
+
+sub _EncodeAmpsAndAngles {
+# Smart processing for ampersands and angle brackets that need to be encoded.
+
+ my $text = shift;
+
+ # Ampersand-encoding based entirely on Nat Irons's Amputator MT plugin:
+ # http://bumppo.net/projects/amputator/
+ $text =~ s/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/&amp;/g;
+
+ # Encode naked <'s
+ $text =~ s{<(?![a-z/?\$!])}{&lt;}gi;
+
+ return $text;
+}
+
+
+sub _EncodeBackslashEscapes {
+#
+# Parameter: String.
+# Returns: The string, with after processing the following backslash
+# escape sequences.
+#
+ local $_ = shift;
+
+ s! \\\\ !$g_escape_table{'\\'}!gx; # Must process escaped backslashes first.
+ s! \\` !$g_escape_table{'`'}!gx;
+ s! \\\* !$g_escape_table{'*'}!gx;
+ s! \\_ !$g_escape_table{'_'}!gx;
+ s! \\\{ !$g_escape_table{'{'}!gx;
+ s! \\\} !$g_escape_table{'}'}!gx;
+ s! \\\[ !$g_escape_table{'['}!gx;
+ s! \\\] !$g_escape_table{']'}!gx;
+ s! \\\( !$g_escape_table{'('}!gx;
+ s! \\\) !$g_escape_table{')'}!gx;
+ s! \\> !$g_escape_table{'>'}!gx;
+ s! \\\# !$g_escape_table{'#'}!gx;
+ s! \\\+ !$g_escape_table{'+'}!gx;
+ s! \\\- !$g_escape_table{'-'}!gx;
+ s! \\\. !$g_escape_table{'.'}!gx;
+ s{ \\! }{$g_escape_table{'!'}}gx;
+
+ return $_;
+}
+
+
+sub _DoAutoLinks {
+ my $text = shift;
+
+ $text =~ s{<((https?|ftp):[^'">\s]+)>}{<a href="$1">$1</a>}gi;
+
+ # Email addresses: <address@domain.foo>
+ $text =~ s{
+ <
+ (?:mailto:)?
+ (
+ [-.\w]+
+ \@
+ [-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+
+ )
+ >
+ }{
+ _EncodeEmailAddress( _UnescapeSpecialChars($1) );
+ }egix;
+
+ return $text;
+}
+
+
+sub _EncodeEmailAddress {
+#
+# Input: an email address, e.g. "foo@example.com"
+#
+# Output: the email address as a mailto link, with each character
+# of the address encoded as either a decimal or hex entity, in
+# the hopes of foiling most address harvesting spam bots. E.g.:
+#
+# <a href="&#x6D;&#97;&#105;&#108;&#x74;&#111;:&#102;&#111;&#111;&#64;&#101;
+# x&#x61;&#109;&#x70;&#108;&#x65;&#x2E;&#99;&#111;&#109;">&#102;&#111;&#111;
+# &#64;&#101;x&#x61;&#109;&#x70;&#108;&#x65;&#x2E;&#99;&#111;&#109;</a>
+#
+# Based on a filter by Matthew Wickline, posted to the BBEdit-Talk
+# mailing list: <http://tinyurl.com/yu7ue>
+#
+
+ my $addr = shift;
+
+ srand;
+ my @encode = (
+ sub { '&#' . ord(shift) . ';' },
+ sub { '&#x' . sprintf( "%X", ord(shift) ) . ';' },
+ sub { shift },
+ );
+
+ $addr = "mailto:" . $addr;
+
+ $addr =~ s{(.)}{
+ my $char = $1;
+ if ( $char eq '@' ) {
+ # this *must* be encoded. I insist.
+ $char = $encode[int rand 1]->($char);
+ } elsif ( $char ne ':' ) {
+ # leave ':' alone (to spot mailto: later)
+ my $r = rand;
+ # roughly 10% raw, 45% hex, 45% dec
+ $char = (
+ $r > .9 ? $encode[2]->($char) :
+ $r < .45 ? $encode[1]->($char) :
+ $encode[0]->($char)
+ );
+ }
+ $char;
+ }gex;
+
+ $addr = qq{<a href="$addr">$addr</a>};
+ $addr =~ s{">.+?:}{">}; # strip the mailto: from the visible part
+
+ return $addr;
+}
+
+
+sub _UnescapeSpecialChars {
+#
+# Swap back in all the special characters we've hidden.
+#
+ my $text = shift;
+
+ while( my($char, $hash) = each(%g_escape_table) ) {
+ $text =~ s/$hash/$char/g;
+ }
+ return $text;
+}
+
+
+sub _TokenizeHTML {
+#
+# Parameter: String containing HTML markup.
+# Returns: Reference to an array of the tokens comprising the input
+# string. Each token is either a tag (possibly with nested,
+# tags contained therein, such as <a href="<MTFoo>">, or a
+# run of text between tags. Each element of the array is a
+# two-element array; the first is either 'tag' or 'text';
+# the second is the actual value.
+#
+#
+# Derived from the _tokenize() subroutine from Brad Choate's MTRegex plugin.
+# <http://www.bradchoate.com/past/mtregex.php>
+#
+
+ my $str = shift;
+ my $pos = 0;
+ my $len = length $str;
+ my @tokens;
+
+ my $depth = 6;
+ my $nested_tags = join('|', ('(?:<[a-z/!$](?:[^<>]') x $depth) . (')*>)' x $depth);
+ my $match = qr/(?s: <! ( -- .*? -- \s* )+ > ) | # comment
+ (?s: <\? .*? \?> ) | # processing instruction
+ $nested_tags/ix; # nested tags
+
+ while ($str =~ m/($match)/g) {
+ my $whole_tag = $1;
+ my $sec_start = pos $str;
+ my $tag_start = $sec_start - length $whole_tag;
+ if ($pos < $tag_start) {
+ push @tokens, ['text', substr($str, $pos, $tag_start - $pos)];
+ }
+ push @tokens, ['tag', $whole_tag];
+ $pos = pos $str;
+ }
+ push @tokens, ['text', substr($str, $pos, $len - $pos)] if $pos < $len;
+ \@tokens;
+}
+
+
+sub _Outdent {
+#
+# Remove one level of line-leading tabs or spaces
+#
+ my $text = shift;
+
+ $text =~ s/^(\t|[ ]{1,$g_tab_width})//gm;
+ return $text;
+}
+
+
+sub _Detab {
+#
+# Cribbed from a post by Bart Lateur:
+# <http://www.nntp.perl.org/group/perl.macperl.anyperl/154>
+#
+ my $text = shift;
+
+ $text =~ s{(.*?)\t}{$1.(' ' x ($g_tab_width - length($1) % $g_tab_width))}ge;
+ return $text;
+}
+
+
+1;
+
+__END__
+
+
+=pod
+
+=head1 NAME
+
+B<Markdown>
+
+
+=head1 SYNOPSIS
+
+B<Markdown.pl> [ B<--html4tags> ] [ B<--version> ] [ B<-shortversion> ]
+ [ I<file> ... ]
+
+
+=head1 DESCRIPTION
+
+Markdown is a text-to-HTML filter; it translates an easy-to-read /
+easy-to-write structured text format into HTML. Markdown's text format
+is most similar to that of plain text email, and supports features such
+as headers, *emphasis*, code blocks, blockquotes, and links.
+
+Markdown's syntax is designed not as a generic markup language, but
+specifically to serve as a front-end to (X)HTML. You can use span-level
+HTML tags anywhere in a Markdown document, and you can use block level
+HTML tags (like <div> and <table> as well).
+
+For more information about Markdown's syntax, see:
+
+ http://daringfireball.net/projects/markdown/
+
+
+=head1 OPTIONS
+
+Use "--" to end switch parsing. For example, to open a file named "-z", use:
+
+ Markdown.pl -- -z
+
+=over 4
+
+
+=item B<--html4tags>
+
+Use HTML 4 style for empty element tags, e.g.:
+
+ <br>
+
+instead of Markdown's default XHTML style tags, e.g.:
+
+ <br />
+
+
+=item B<-v>, B<--version>
+
+Display Markdown's version number and copyright information.
+
+
+=item B<-s>, B<--shortversion>
+
+Display the short-form version number.
+
+
+=back
+
+
+
+=head1 BUGS
+
+To file bug reports or feature requests (other than topics listed in the
+Caveats section above) please send email to:
+
+ support@daringfireball.net
+
+Please include with your report: (1) the example input; (2) the output
+you expected; (3) the output Markdown actually produced.
+
+
+=head1 VERSION HISTORY
+
+See the readme file for detailed release notes for this version.
+
+1.0.1 - 14 Dec 2004
+
+1.0 - 28 Aug 2004
+
+
+=head1 AUTHOR
+
+ John Gruber
+ http://daringfireball.net
+
+ PHP port and other contributions by Michel Fortin
+ http://michelf.com
+
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (c) 2003-2004 John Gruber
+<http://daringfireball.net/>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+* Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+* Neither the name "Markdown" nor the names of its contributors may
+ be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+This software is provided by the copyright holders and contributors "as
+is" and any express or implied warranties, including, but not limited
+to, the implied warranties of merchantability and fitness for a
+particular purpose are disclaimed. In no event shall the copyright owner
+or contributors be liable for any direct, indirect, incidental, special,
+exemplary, or consequential damages (including, but not limited to,
+procurement of substitute goods or services; loss of use, data, or
+profits; or business interruption) however caused and on any theory of
+liability, whether in contract, strict liability, or tort (including
+negligence or otherwise) arising in any way out of the use of this
+software, even if advised of the possibility of such damage.
+
+=cut
View
211 junit.history/junit.git.categories02/build/github_upload.rb
@@ -0,0 +1,211 @@
+# require
+require 'rubygems'
+
+#### INLINE: fixed version of https://github.com/github/upload ####
+
+require 'tempfile'
+require 'nokogiri'
+require 'httpclient'
+require 'stringio'
+require 'json'
+require 'faster_xml_simple'
+
+module Net
+ module GitHub
+ class Upload
+ VERSION = '0.0.5'
+ def initialize params=nil
+ @login = params[:login]
+ @token = params[:token]
+
+ if @login.empty? or @token.empty?
+ raise "login or token is empty"
+ end
+ end
+
+ def upload info
+ unless info[:repos]
+ raise "required repository name"
+ end
+ info[:repos] = @login + '/' + info[:repos] unless info[:repos].include? '/'
+
+ if info[:file]
+ file = info[:file]
+ unless File.exist?(file) && File.readable?(file)
+ raise "file does not exsits or readable"
+ end
+ info[:name] ||= File.basename(file)
+ end
+ unless info[:file] || info[:data]
+ raise "required file or data parameter to upload"
+ end
+
+ unless info[:name]
+ raise "required name parameter for filename with data parameter"
+ end
+
+ if info[:replace]
+ list_files(info[:repos]).each { |obj|
+ next unless obj[:name] == info[:name]
+ delete info[:repos], obj[:id]
+ }
+ elsif list_files(info[:repos]).any?{|obj| obj[:name] == info[:name]}
+ raise "file '#{info[:name]}' is already uploaded. please try different name"
+ end
+
+ info[:content_type] ||= 'application/octet-stream'
+ stat = HTTPClient.post("https://github.com/#{info[:repos]}/downloads", {
+ "file_size" => info[:file] ? File.stat(info[:file]).size : info[:data].size,
+ "content_type" => info[:content_type],
+ "file_name" => info[:name],
+ "description" => info[:description] || '',
+ "login" => @login,
+ "token" => @token
+ })
+
+ unless stat.code == 200
+ raise "Failed to post file info"
+ end
+
+ upload_info = JSON.parse(stat.content)
+ if info[:file]
+ f = File.open(info[:file], 'rb')
+ else
+ f = Tempfile.open('net-github-upload')
+ f << info[:data]
+ f.flush
+ end
+ stat = HTTPClient.post("http://github.s3.amazonaws.com/", [
+ ['Filename', info[:name]],
+ ['policy', upload_info['policy']],
+ ['success_action_status', 201],
+ ['key', upload_info['path']],
+ ['AWSAccessKeyId', upload_info['accesskeyid']],
+ ['Content-Type', upload_info['content_type'] || 'application/octet-stream'],
+ ['signature', upload_info['signature']],
+ ['acl', upload_info['acl']],
+ ['file', f]
+ ])
+ f.close
+
+ if stat.code == 201
+ return FasterXmlSimple.xml_in(stat.content)['PostResponse']['Location']
+ else
+ raise 'Failed to upload' + extract_error_message(stat)
+ end
+ end
+
+ def replace info
+ upload info.merge( :replace => true )
+ end
+
+ def delete_all repos
+ unless repos
+ raise "required repository name"
+ end
+ repos = @login + '/' + repos unless repos.include? '/'
+ list_files(repos).each { |obj|
+ delete repos, obj[:id]
+ }
+ end
+
+ private
+
+ def extract_error_message(stat)
+ # @see http://docs.amazonwebservices.com/AmazonS3/2006-03-01/ErrorResponses.html
+ error = FasterXmlSimple.xml_in(stat.content)['Error']
+ " due to #{error['Code']} (#{error['Message']})"
+ rescue
+ ''
+ end
+
+ def delete repos, id
+ HTTPClient.post("https://github.com/#{repos}/downloads/#{id.gsub( "download_", '')}", {
+ "_method" => "delete",
+ "login" => @login,
+ "token" => @token
+ })
+ end
+
+ def list_files repos
+ raise "required repository name" unless repos
+ res = HTTPClient.get_content("https://github.com/#{repos}/downloads", {
+ "login" => @login,
+ "token" => @token
+ })
+ Nokogiri::HTML(res).xpath('id("manual_downloads")/li').map do |fileinfo|
+ obj = {
+ :description => fileinfo.at_xpath('descendant::h4').text,
+ :date => fileinfo.at_xpath('descendant::p/time').attribute('title').text,
+ :size => fileinfo.at_xpath('descendant::p/strong').text,
+ :id => /\d+$/.match(fileinfo.at_xpath('a').attribute('href').text)[0]
+ }
+ anchor = fileinfo.at_xpath('descendant::h4/a')
+ obj[:link] = anchor.attribute('href').text
+ obj[:name] = anchor.text
+ obj
+ end
+ end
+ end
+ end
+end
+
+#### END INLINE ####
+
+# setup
+login = `git config github.user`.chomp # your login for github
+token = `git config github.token`.chomp # your token for github
+repos = 'KentBeck/junit' # your repos name (like 'taberareloo')
+gh = Net::GitHub::Upload.new(
+ :login => login,
+ :token => token
+)
+
+version = ARGV[0]
+
+def upload(gh, version, repos, filename, description)
+ gh.upload(:repos => repos,
+ :file => "junit#{version}/#{filename}",
+ :description => description)
+end
+
+upload(gh, version, repos, "junit-#{version}-src.jar", 'Source jar')
+upload(gh, version, repos, "junit-#{version}.jar", 'Basic jar')
+upload(gh, version, repos, "junit-dep-#{version}.jar", 'Jar without hamcrest')
+upload(gh, version, repos, "junit#{version}.zip", 'Source zip')
+
+# # file upload
+# direct_link = gh.upload(
+# :repos => repos,
+# :file => 'test/test',
+# :description => "test file"
+# )
+# # direct link is link to Amazon S3.
+# # Because GitHub refrection for file changing is async,
+# # if you get changed file synchronously, you use this "direct_link"
+#
+# # data upload
+# # you can define content_type => Amazon S3 Content-Type
+# time = Time.now.to_i
+# direct_link = gh.upload(
+# :repos => repos,
+# :data => 'test',
+# :name => "test_#{time}.txt",
+# :content_type => 'text/plain',
+# :description => "test file2"
+# )
+#
+# # replace file or data
+# # thx id:rngtng !
+# direct_link = gh.replace(
+# :repos => repos,
+# :file => 'test/test',
+# :description => "test file"
+# )
+# direct_link = gh.replace(
+# :repos => repos,
+# :data => 'test',
+# :name => "test_#{time}.txt",
+# :content_type => 'text/plain',
+# :description => "test file2"
+# )
View
BIN  junit.history/junit.git.categories02/build/lib/ant-contrib-1.0b3.jar
Binary file not shown
View
BIN  junit.history/junit.git.categories02/build/lib/commons-net-1.4.1.jar
Binary file not shown
View
BIN  junit.history/junit.git.categories02/build/lib/jakarta-oro-2.0.8.jar
Binary file not shown
View
BIN  junit.history/junit.git.categories02/build/lib/maven-ant-tasks-2.1.1.jar
Binary file not shown
View
13 junit.history/junit.git.categories02/build/maven/junit-dep-pom-template.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd ">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>junit</groupId>
+ <artifactId>junit-dep</artifactId>
+ <version>@version@</version>
+ <distributionManagement>
+ <relocation>
+ <artifactId>junit</artifactId>
+ </relocation>
+ </distributionManagement>
+</project>
View
68 junit.history/junit.git.categories02/build/maven/junit-pom-template.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd ">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>@version@</version>
+ <name>JUnit</name>
+ <url>http://junit.org</url>
+ <description>
+ JUnit is a regression testing framework written by Erich Gamma and Kent Beck.
+ It is used by the developer who implements unit tests in Java.
+ </description>
+ <organization>
+ <name>JUnit</name>
+ <url>http://www.junit.org</url>
+ </organization>
+ <mailingLists>
+ <mailingList>
+ <name>JUnit Mailing List</name>
+ <post>junit@yahoogroups.com</post>
+ <archive>
+ http://tech.groups.yahoo.com/group/junit/
+ </archive>
+ </mailingList>
+ </mailingLists>
+ <licenses>
+ <license>
+ <name>Common Public License Version 1.0</name>
+ <url>http://www.opensource.org/licenses/cpl1.0.txt</url>
+ </license>
+ </licenses>
+ <scm>
+ <connection>scm:git:git://github.com/KentBeck/junit.git</connection>
+ <developerConnection>scm:git:git@github.com:KentBeck/junit.git</developerConnection>
+ <url>http://github.com/KentBeck/junit/tree/master</url>
+ </scm>
+ <developers>
+ <developer>
+ <id>dsaff</id>
+ <name>David Saff</name>
+ <email>david@saff.net</email>
+ </developer>
+ </developers>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <encoding>ISO-8859-1</encoding>
+ <source>${jdk.version}</source>
+ <target>${jdk.version}</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.hamcrest</groupId>
+ <artifactId>hamcrest-core</artifactId>
+ <version>1.1</version>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+ <properties>
+ <jdk.version>1.5</jdk.version>
+ </properties>
+</project>
View
49 junit.history/junit.git.categories02/build/maven/post_maven_tests.sh
@@ -0,0 +1,49 @@
+set -e
+set -o pipefail
+
+function TEST_junit_dep_49_plays_not_nicely_with_later_hamcrest {
+ # Make sure our system notices the bug (this broke because of a bad push)
+ ! runs_with_newer_hamcrest junit-dep 4.9
+}
+
+function TEST_junit_dep_snapshot_plays_nicely_with_later_hamcrest {
+ runs_with_newer_hamcrest junit-dep LATEST
+}
+
+function TEST_junit_snapshot_plays_not_nicely_with_later_hamcrest {
+ ! runs_with_newer_hamcrest junit LATEST
+}
+
+function runs_with_newer_hamcrest {
+ local artifact_id=$1
+ local version=$2
+ rm -rf ~/.m2/repository/junit
+ rm -rf uses_junit
+ cp -r sample_project_template uses_junit
+ sed -i '' -e "s/___ARTIFACT_ID___/$artifact_id/" uses_junit/pom.xml
+ sed -i '' -e "s/___VERSION___/$version/" uses_junit/pom.xml
+ in_dir uses_junit mvn test
+ finally rm -rf uses_junit
+}
+
+### <copied src="https://gist.github.com/1206506">
+function in_dir {
+ local dir=$1
+ shift
+ if [ ! -e $dir ]; then
+ echo "$dir does not exist"
+ return 1
+ fi
+ pushd $dir >/dev/null
+ "$@"
+ finally popd >/dev/null
+}
+
+function finally {
+ local return_this=$?
+ "$@"
+ return $return_this
+}
+### </copied>
+
+source ../run_tests.sh
View
61