win32-api 1.5.3-universal-mingw32 → 1.6.0-universal-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (358) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES +174 -169
  3. data/Gemfile +4 -0
  4. data/Gemfile.lock +24 -0
  5. data/README +129 -131
  6. data/Rakefile +185 -182
  7. data/appveyor.yml +42 -0
  8. data/ext/win32/api.c +1092 -1092
  9. data/lib/win32/api.rb +14 -8
  10. data/lib/win32/ruby21_32/win32/api.so +0 -0
  11. data/lib/win32/ruby21_64/win32/api.so +0 -0
  12. data/lib/win32/ruby22_32/win32/api.so +0 -0
  13. data/lib/win32/ruby22_64/win32/api.so +0 -0
  14. data/lib/win32/ruby23_32/win32/api.so +0 -0
  15. data/lib/win32/ruby23_64/win32/api.so +0 -0
  16. data/lib/win32/ruby2_32/win32/api.so +0 -0
  17. data/lib/win32/ruby2_64/win32/api.so +0 -0
  18. data/test/test_win32_api.rb +145 -145
  19. data/vendor/bundle/ruby/2.2.0/bin/devkit +23 -0
  20. data/vendor/bundle/ruby/2.2.0/bin/devkit.bat +6 -0
  21. data/vendor/bundle/ruby/2.2.0/bin/rake +23 -0
  22. data/vendor/bundle/ruby/2.2.0/bin/rake.bat +6 -0
  23. data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/CHANGELOG +55 -0
  24. data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/LICENSE +339 -0
  25. data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/README.md +73 -0
  26. data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/Rakefile +8 -0
  27. data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/colorize.gemspec +35 -0
  28. data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/lib/colorize.rb +12 -0
  29. data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/lib/colorize/class_methods.rb +116 -0
  30. data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/lib/colorize/instance_methods.rb +135 -0
  31. data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/test/test_colorize.rb +161 -0
  32. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/Gemfile +4 -0
  33. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/LICENSE.txt +22 -0
  34. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/README.md +34 -0
  35. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/Rakefile +1 -0
  36. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/Rspec-example-matchers.txt +184 -0
  37. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/bin/devkit +87 -0
  38. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/devkit.gemspec +27 -0
  39. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/lib/devkit.rb +18 -0
  40. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/lib/devkit/core.rb +53 -0
  41. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/lib/devkit/identity.rb +78 -0
  42. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/lib/devkit/ssh_identity.rb +53 -0
  43. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/lib/devkit/version.rb +3 -0
  44. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/spec/devkit/core_spec.rb +46 -0
  45. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/spec/devkit/identity_spec.rb +1 -0
  46. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/spec/devkit/ssh_identity_spec.rb +1 -0
  47. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/spec/devkit_spec.rb +5 -0
  48. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/spec/spec_helper.rb +8 -0
  49. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/AUTHORS +3 -0
  50. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/COPYING +339 -0
  51. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/Changelog.md +415 -0
  52. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/Gemfile +9 -0
  53. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/INSTALL +59 -0
  54. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/LICENSE +7 -0
  55. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/README.rdoc +74 -0
  56. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/Rakefile +30 -0
  57. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/TODO +6 -0
  58. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/ansi_colors.rb +38 -0
  59. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/asking_for_arrays.rb +18 -0
  60. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/basic_usage.rb +75 -0
  61. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/color_scheme.rb +32 -0
  62. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/get_character.rb +12 -0
  63. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/limit.rb +12 -0
  64. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/menus.rb +65 -0
  65. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/overwrite.rb +19 -0
  66. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/page_and_wrap.rb +322 -0
  67. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/password.rb +7 -0
  68. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/repeat_entry.rb +21 -0
  69. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/trapping_eof.rb +22 -0
  70. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/using_readline.rb +17 -0
  71. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/highline.gemspec +37 -0
  72. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline.rb +1048 -0
  73. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/color_scheme.rb +134 -0
  74. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/compatibility.rb +16 -0
  75. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/import.rb +41 -0
  76. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/menu.rb +381 -0
  77. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/question.rb +480 -0
  78. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/simulate.rb +48 -0
  79. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/style.rb +192 -0
  80. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/version.rb +4 -0
  81. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/setup.rb +1360 -0
  82. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/site/highline.css +65 -0
  83. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/site/images/logo.png +0 -0
  84. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/site/index.html +58 -0
  85. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/string_methods.rb +32 -0
  86. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_color_scheme.rb +96 -0
  87. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_highline.rb +1402 -0
  88. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_import.rb +52 -0
  89. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_menu.rb +439 -0
  90. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_simulator.rb +23 -0
  91. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_string_highline.rb +38 -0
  92. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_style.rb +578 -0
  93. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/BSDL +22 -0
  94. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/COPYING +57 -0
  95. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/Gemfile +9 -0
  96. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/LEGAL +4 -0
  97. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/README.rdoc +19 -0
  98. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/Rakefile +16 -0
  99. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/benchmarks/bm_yhpg.rb +59 -0
  100. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/benchmarks/helper.rb +8 -0
  101. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/lib/power_assert.rb +338 -0
  102. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/lib/power_assert/enable_tracepoint_events.rb +82 -0
  103. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/lib/power_assert/version.rb +3 -0
  104. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/power_assert.gemspec +23 -0
  105. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/test/helper.rb +10 -0
  106. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/test/test_power_assert.rb +512 -0
  107. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/CONTRIBUTING.rdoc +38 -0
  108. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/History.rdoc +719 -0
  109. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/MIT-LICENSE +21 -0
  110. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/Manifest.txt +154 -0
  111. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/README.rdoc +157 -0
  112. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/Rakefile +82 -0
  113. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/bin/rake +33 -0
  114. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/command_line_usage.rdoc +158 -0
  115. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/example/Rakefile1 +38 -0
  116. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/example/Rakefile2 +35 -0
  117. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/example/a.c +6 -0
  118. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/example/b.c +6 -0
  119. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/example/main.c +11 -0
  120. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/glossary.rdoc +42 -0
  121. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/jamis.rb +591 -0
  122. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/proto_rake.rdoc +127 -0
  123. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/rake.1 +141 -0
  124. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/rakefile.rdoc +624 -0
  125. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/rational.rdoc +151 -0
  126. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.4.14.rdoc +23 -0
  127. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.4.15.rdoc +35 -0
  128. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.5.0.rdoc +53 -0
  129. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.5.3.rdoc +78 -0
  130. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.5.4.rdoc +46 -0
  131. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.6.0.rdoc +141 -0
  132. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.7.0.rdoc +119 -0
  133. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.7.1.rdoc +59 -0
  134. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.7.2.rdoc +121 -0
  135. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.7.3.rdoc +47 -0
  136. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.0.rdoc +114 -0
  137. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.2.rdoc +165 -0
  138. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.3.rdoc +112 -0
  139. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.4.rdoc +147 -0
  140. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.5.rdoc +53 -0
  141. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.6.rdoc +37 -0
  142. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.7.rdoc +55 -0
  143. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.0.rdoc +112 -0
  144. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.1.rdoc +52 -0
  145. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.2.2.rdoc +55 -0
  146. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.2.rdoc +49 -0
  147. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.3.rdoc +102 -0
  148. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.4.rdoc +60 -0
  149. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.5.rdoc +55 -0
  150. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.6.rdoc +64 -0
  151. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-10.0.0.rdoc +178 -0
  152. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-10.0.1.rdoc +58 -0
  153. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-10.0.2.rdoc +53 -0
  154. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-10.0.3.rdoc +191 -0
  155. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-10.1.0.rdoc +61 -0
  156. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake.rb +73 -0
  157. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/application.rb +787 -0
  158. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/backtrace.rb +23 -0
  159. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/clean.rb +76 -0
  160. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/cloneable.rb +16 -0
  161. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/contrib/compositepublisher.rb +21 -0
  162. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/contrib/ftptools.rb +137 -0
  163. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/contrib/sshpublisher.rb +60 -0
  164. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/cpu_counter.rb +120 -0
  165. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/default_loader.rb +14 -0
  166. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/dsl_definition.rb +194 -0
  167. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/early_time.rb +21 -0
  168. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/file_creation_task.rb +24 -0
  169. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/file_list.rb +436 -0
  170. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/file_task.rb +46 -0
  171. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/file_utils.rb +123 -0
  172. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/invocation_chain.rb +56 -0
  173. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/invocation_exception_mixin.rb +16 -0
  174. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/late_time.rb +17 -0
  175. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/linked_list.rb +111 -0
  176. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/loaders/makefile.rb +53 -0
  177. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/multi_task.rb +13 -0
  178. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/name_space.rb +38 -0
  179. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/packagetask.rb +199 -0
  180. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/phony.rb +15 -0
  181. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/private_reader.rb +20 -0
  182. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/promise.rb +99 -0
  183. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/pseudo_status.rb +29 -0
  184. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/rake_module.rb +38 -0
  185. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/rake_test_loader.rb +22 -0
  186. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/rule_recursion_overflow_error.rb +20 -0
  187. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/scope.rb +42 -0
  188. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/task.rb +391 -0
  189. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/task_argument_error.rb +7 -0
  190. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/task_arguments.rb +102 -0
  191. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/task_manager.rb +316 -0
  192. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/tasklib.rb +11 -0
  193. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/testtask.rb +204 -0
  194. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/thread_history_display.rb +48 -0
  195. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/thread_pool.rb +163 -0
  196. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/trace_output.rb +22 -0
  197. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/version.rb +7 -0
  198. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/win32.rb +50 -0
  199. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/rakelib/test_times.rake +25 -0
  200. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/file_creation.rb +34 -0
  201. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/helper.rb +134 -0
  202. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/support/rakefile_definitions.rb +476 -0
  203. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/support/ruby_runner.rb +34 -0
  204. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_private_reader.rb +42 -0
  205. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake.rb +40 -0
  206. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_application.rb +659 -0
  207. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_application_options.rb +468 -0
  208. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_backtrace.rb +119 -0
  209. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_clean.rb +61 -0
  210. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_cpu_counter.rb +68 -0
  211. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_definitions.rb +84 -0
  212. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_directory_task.rb +76 -0
  213. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_dsl.rb +40 -0
  214. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_early_time.rb +31 -0
  215. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_creation_task.rb +56 -0
  216. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_list.rb +687 -0
  217. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_list_path_map.rb +15 -0
  218. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_task.rb +197 -0
  219. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_utils.rb +318 -0
  220. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_ftp_file.rb +74 -0
  221. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_functional.rb +484 -0
  222. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_invocation_chain.rb +64 -0
  223. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_late_time.rb +18 -0
  224. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_linked_list.rb +84 -0
  225. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_makefile_loader.rb +46 -0
  226. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_multi_task.rb +64 -0
  227. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_name_space.rb +57 -0
  228. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_package_task.rb +79 -0
  229. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_path_map.rb +168 -0
  230. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_path_map_explode.rb +34 -0
  231. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_path_map_partial.rb +18 -0
  232. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_pseudo_status.rb +21 -0
  233. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_rake_test_loader.rb +20 -0
  234. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_reduce_compat.rb +26 -0
  235. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_require.rb +40 -0
  236. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_rules.rb +388 -0
  237. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_scope.rb +44 -0
  238. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task.rb +430 -0
  239. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task_argument_parsing.rb +119 -0
  240. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task_arguments.rb +134 -0
  241. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task_manager.rb +178 -0
  242. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task_manager_argument_resolution.rb +19 -0
  243. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task_with_arguments.rb +172 -0
  244. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_test_task.rb +130 -0
  245. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_thread_pool.rb +145 -0
  246. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_top_level_functions.rb +71 -0
  247. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_win32.rb +72 -0
  248. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_thread_history_display.rb +101 -0
  249. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_trace_output.rb +52 -0
  250. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/COPYING +64 -0
  251. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/GPL +339 -0
  252. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/LGPL +502 -0
  253. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/PSFL +271 -0
  254. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/README.md +101 -0
  255. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/Rakefile +71 -0
  256. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test-unit.rb +34 -0
  257. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit.rb +505 -0
  258. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/assertion-failed-error.rb +25 -0
  259. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/assertions.rb +2218 -0
  260. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/attribute-matcher.rb +26 -0
  261. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/attribute.rb +158 -0
  262. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/auto-runner-loader.rb +17 -0
  263. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/autorunner.rb +536 -0
  264. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/code-snippet-fetcher.rb +58 -0
  265. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector.rb +73 -0
  266. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector/descendant.rb +19 -0
  267. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector/dir.rb +108 -0
  268. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector/load.rb +202 -0
  269. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector/objectspace.rb +34 -0
  270. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector/xml.rb +249 -0
  271. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/color-scheme.rb +198 -0
  272. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/color.rb +134 -0
  273. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/data.rb +262 -0
  274. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/diff.rb +746 -0
  275. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/error.rb +158 -0
  276. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/exception-handler.rb +82 -0
  277. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/failure.rb +169 -0
  278. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/fault-location-detector.rb +100 -0
  279. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/fixture.rb +295 -0
  280. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/notification.rb +136 -0
  281. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/omission.rb +195 -0
  282. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/pending.rb +154 -0
  283. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/priority.rb +192 -0
  284. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/runner/console.rb +59 -0
  285. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/runner/emacs.rb +8 -0
  286. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/runner/xml.rb +15 -0
  287. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/test-suite-creator.rb +89 -0
  288. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/testcase.rb +811 -0
  289. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/testresult.rb +132 -0
  290. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/testsuite.rb +175 -0
  291. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/console/outputlevel.rb +15 -0
  292. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/console/testrunner.rb +693 -0
  293. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/emacs/testrunner.rb +49 -0
  294. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/testrunner.rb +53 -0
  295. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/testrunnermediator.rb +114 -0
  296. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/testrunnerutilities.rb +41 -0
  297. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/xml/testrunner.rb +224 -0
  298. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/util/backtracefilter.rb +59 -0
  299. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/util/method-owner-finder.rb +28 -0
  300. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/util/observable.rb +90 -0
  301. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/util/output.rb +31 -0
  302. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/util/procwrapper.rb +48 -0
  303. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/version.rb +5 -0
  304. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/sample/adder.rb +13 -0
  305. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/sample/subtracter.rb +12 -0
  306. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/sample/test_adder.rb +20 -0
  307. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/sample/test_subtracter.rb +20 -0
  308. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/sample/test_user.rb +23 -0
  309. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/collector/test-descendant.rb +178 -0
  310. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/collector/test-load.rb +442 -0
  311. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/collector/test_dir.rb +406 -0
  312. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/collector/test_objectspace.rb +100 -0
  313. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/header-label.csv +3 -0
  314. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/header-label.tsv +3 -0
  315. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/header.csv +3 -0
  316. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/header.tsv +3 -0
  317. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/no-header.csv +2 -0
  318. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/no-header.tsv +2 -0
  319. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/plus.csv +3 -0
  320. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/run-test.rb +22 -0
  321. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-assertions.rb +2160 -0
  322. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-attribute-matcher.rb +38 -0
  323. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-attribute.rb +123 -0
  324. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-code-snippet.rb +37 -0
  325. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-color-scheme.rb +82 -0
  326. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-color.rb +47 -0
  327. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-data.rb +303 -0
  328. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-diff.rb +518 -0
  329. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-emacs-runner.rb +60 -0
  330. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-error.rb +26 -0
  331. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-failure.rb +33 -0
  332. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-fault-location-detector.rb +163 -0
  333. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-fixture.rb +713 -0
  334. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-notification.rb +33 -0
  335. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-omission.rb +81 -0
  336. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-pending.rb +70 -0
  337. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-priority.rb +173 -0
  338. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-test-case.rb +1171 -0
  339. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-test-result.rb +113 -0
  340. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-test-suite-creator.rb +97 -0
  341. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-test-suite.rb +150 -0
  342. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/testunit-test-util.rb +31 -0
  343. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/ui/test_testrunmediator.rb +20 -0
  344. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/util/test-method-owner-finder.rb +38 -0
  345. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/util/test-output.rb +11 -0
  346. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/util/test_backtracefilter.rb +52 -0
  347. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/util/test_observable.rb +102 -0
  348. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/util/test_procwrapper.rb +36 -0
  349. data/vendor/bundle/ruby/2.2.0/specifications/colorize-0.7.7.gemspec +38 -0
  350. data/vendor/bundle/ruby/2.2.0/specifications/devkit-0.1.0.gemspec +46 -0
  351. data/vendor/bundle/ruby/2.2.0/specifications/highline-1.7.8.gemspec +37 -0
  352. data/vendor/bundle/ruby/2.2.0/specifications/power_assert-0.3.0.gemspec +41 -0
  353. data/vendor/bundle/ruby/2.2.0/specifications/rake-11.1.2.gemspec +43 -0
  354. data/vendor/bundle/ruby/2.2.0/specifications/test-unit-3.1.9.gemspec +47 -0
  355. data/win32-api.gemspec +27 -27
  356. metadata +345 -5
  357. data/lib/win32/ruby18/win32/api.so +0 -0
  358. data/lib/win32/ruby19/win32/api.so +0 -0
@@ -0,0 +1,38 @@
1
+ require 'test/unit'
2
+ require 'testunit-test-util'
3
+
4
+ class TestAttributeMatcher < Test::Unit::TestCase
5
+ include TestUnitTestUtil
6
+
7
+ def setup
8
+ @test = {}
9
+ @matcher = Test::Unit::AttributeMatcher.new(@test)
10
+ end
11
+
12
+ def test_nonexistent
13
+ assert_false(@matcher.match?("nonexistent"))
14
+ end
15
+
16
+ def test_existent
17
+ @test[:existent] = true
18
+ assert_true(@matcher.match?("existent"))
19
+ end
20
+
21
+ def test_and
22
+ @test[:slow] = true
23
+ @test[:important] = true
24
+ assert_true(@matcher.match?("important and slow"))
25
+ end
26
+
27
+ def test_complex
28
+ @test[:tags] = [:slow, :web]
29
+ @test[:bug] = "2929"
30
+ assert_true(@matcher.match?("tags.include?(:web) or bug == '29'"))
31
+ end
32
+
33
+ def test_exception
34
+ assert_raise(NoMethodError) do
35
+ @matcher.match?("nonexistent > 100")
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,123 @@
1
+ class TestUnitAttribute < Test::Unit::TestCase
2
+ class TestStack < Test::Unit::TestCase
3
+ class << self
4
+ def suite
5
+ Test::Unit::TestSuite.new(name)
6
+ end
7
+ end
8
+
9
+ class Stack
10
+ def initialize
11
+ @data = []
12
+ end
13
+
14
+ def push(data)
15
+ @data.push(data)
16
+ end
17
+
18
+ def peek
19
+ @data[-2]
20
+ end
21
+
22
+ def empty?
23
+ @data.empty?
24
+ end
25
+
26
+ def size
27
+ @data.size + 11
28
+ end
29
+ end
30
+
31
+ def setup
32
+ @stack = Stack.new
33
+ end
34
+
35
+ attribute :category, :accessor
36
+ def test_peek
37
+ @stack.push(1)
38
+ @stack.push(2)
39
+ assert_equal(2, @stack.peek)
40
+ end
41
+
42
+ attribute :bug, 1234
43
+ def test_bug_1234
44
+ assert_equal(0, @stack.size)
45
+ end
46
+
47
+ def test_no_attributes
48
+ assert(@stack.empty?)
49
+ @stack.push(1)
50
+ assert(!@stack.empty?)
51
+ assert_equal(1, @stack.size)
52
+ end
53
+ end
54
+
55
+ def test_set_attributes
56
+ test_for_accessor_category = TestStack.new("test_peek")
57
+ assert_equal({"category" => :accessor},
58
+ test_for_accessor_category.attributes)
59
+
60
+ test_for_bug_1234 = TestStack.new("test_bug_1234")
61
+ assert_equal({"bug" => 1234}, test_for_bug_1234.attributes)
62
+
63
+ test_no_attributes = TestStack.new("test_no_attributes")
64
+ assert_equal({}, test_no_attributes.attributes)
65
+ end
66
+
67
+ def test_callback
68
+ changed_attributes = []
69
+ observer = Proc.new do |test_case, key, old_value, value, method_name|
70
+ changed_attributes << [test_case, key, old_value, value, method_name]
71
+ end
72
+
73
+ test_case = Class.new(TestStack) do
74
+ register_attribute_observer(:bug, &observer)
75
+ attribute("bug", 9876, "test_bug_1234")
76
+ attribute(:description, "Test for peek", "test_peek")
77
+ attribute(:bug, 29, "test_peek")
78
+ end
79
+
80
+ assert_equal([
81
+ [test_case, "bug", 1234, 9876, "test_bug_1234"],
82
+ [test_case, "bug", nil, 29, "test_peek"],
83
+ ],
84
+ changed_attributes)
85
+ end
86
+
87
+ def test_attributes_with_prepended_module
88
+ omit("Module#prepend is needed") unless Module.respond_to?(:prepend, true)
89
+ test_case = Class.new(TestStack) do
90
+ prepend Module.new
91
+ end
92
+ assert_equal({
93
+ "category" => :accessor,
94
+ },
95
+ test_case.attributes("test_peek"))
96
+ end
97
+
98
+ class TestDescription < self
99
+ def test_decoration_style
100
+ test_case = Class.new(TestStack) do
101
+ description "Test for push"
102
+ def test_push
103
+ end
104
+ end
105
+
106
+ test_push = test_case.new("test_push")
107
+ assert_equal({"description" => "Test for push"},
108
+ test_push.attributes)
109
+ end
110
+
111
+ def test_explicit_test_name_style
112
+ test_case = Class.new(TestStack) do
113
+ def test_push
114
+ end
115
+ description "Test for push", :test_push
116
+ end
117
+
118
+ test_push = test_case.new("test_push")
119
+ assert_equal({"description" => "Test for push"},
120
+ test_push.attributes)
121
+ end
122
+ end
123
+ end
@@ -0,0 +1,37 @@
1
+ require "test-unit"
2
+ require "testunit-test-util"
3
+
4
+ class TestCodeSnippet < Test::Unit::TestCase
5
+ include TestUnitTestUtil
6
+
7
+ class TestJRuby < self
8
+ def test_error_inside_jruby
9
+ jruby_only_test
10
+
11
+ backtrace = backtrace_from_jruby
12
+ no_rb_entries = backtrace.find_all do |(file, _, _)|
13
+ File.extname(file) != ".rb"
14
+ end
15
+
16
+ fetcher = Test::Unit::CodeSnippetFetcher.new
17
+ snippets = no_rb_entries.collect do |(file, line, _)|
18
+ fetcher.fetch(file, line)
19
+ end
20
+ assert_equal([[]] * no_rb_entries.size,
21
+ snippets)
22
+ end
23
+
24
+ private
25
+ def backtrace_from_jruby
26
+ begin
27
+ java.util.Vector.new(-1)
28
+ rescue Exception
29
+ $@.collect do |entry|
30
+ entry.split(/:/, 3)
31
+ end
32
+ else
33
+ flunk("failed to raise an exception from JRuby.")
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,82 @@
1
+ class TestUnitColorScheme < Test::Unit::TestCase
2
+ def test_register
3
+ inverted_scheme_spec = {
4
+ "success" => {:name => "red"},
5
+ "failure" => {:name => "green"},
6
+ }
7
+ Test::Unit::ColorScheme["inverted"] = inverted_scheme_spec
8
+ assert_equal({
9
+ "success" => color("red"),
10
+ "failure" => color("green"),
11
+ },
12
+ Test::Unit::ColorScheme["inverted"].to_hash)
13
+ end
14
+
15
+ def test_new_with_colors
16
+ scheme = Test::Unit::ColorScheme.new(:success => color("blue"),
17
+ "failure" => color("green",
18
+ :underline => true))
19
+ assert_equal({
20
+ "success" => color("blue"),
21
+ "failure" => color("green", :underline => true),
22
+ },
23
+ scheme.to_hash)
24
+ end
25
+
26
+ def test_new_with_spec
27
+ scheme = Test::Unit::ColorScheme.new(:success => {
28
+ :name => "blue",
29
+ :bold => true
30
+ },
31
+ "failure" => {:name => "green"})
32
+ assert_equal({
33
+ "success" => color("blue", :bold => true),
34
+ "failure" => color("green"),
35
+ },
36
+ scheme.to_hash)
37
+ end
38
+
39
+ private
40
+ def color(name, options={})
41
+ Test::Unit::Color.new(name, options)
42
+ end
43
+
44
+ class TestFor8Colors < self
45
+ def setup
46
+ @original_term, ENV["TERM"] = ENV["TERM"], nil
47
+ @original_color_term, ENV["COLORTERM"] = ENV["COLORTERM"], nil
48
+ ENV["TERM"] = "xterm"
49
+ end
50
+
51
+ def teardown
52
+ ENV["TERM"] = @original_term
53
+ ENV["COLORTERM"] = @original_color_term
54
+ end
55
+
56
+ def test_default
57
+ expected_schema_keys = [
58
+ "pass",
59
+ "pass-marker",
60
+ "failure",
61
+ "failure-marker",
62
+ "pending",
63
+ "pending-marker",
64
+ "omission",
65
+ "omission-marker",
66
+ "notification",
67
+ "notification-marker",
68
+ "error",
69
+ "error-marker",
70
+ "case",
71
+ "suite",
72
+ "diff-inserted-tag",
73
+ "diff-deleted-tag",
74
+ "diff-difference-tag",
75
+ "diff-inserted",
76
+ "diff-deleted",
77
+ ]
78
+ assert_equal(expected_schema_keys.sort,
79
+ Test::Unit::ColorScheme.default.to_hash.keys.sort)
80
+ end
81
+ end
82
+ end
@@ -0,0 +1,47 @@
1
+ class TestUnitColor < Test::Unit::TestCase
2
+ def test_color_escape_sequence
3
+ assert_escape_sequence(["31"], color("red"))
4
+ assert_escape_sequence(["32", "1"], color("green", :bold => true))
5
+ assert_escape_sequence(["0"], color("reset"))
6
+ assert_escape_sequence(["45"], color("magenta", :background => true))
7
+ end
8
+
9
+ def test_mix_color_escape_sequence
10
+ assert_escape_sequence(["34", "1"],
11
+ mix_color([color("blue"),
12
+ color("none", :bold => true)]))
13
+ assert_escape_sequence(["34", "1", "4"],
14
+ mix_color([color("blue"),
15
+ color("none", :bold => true)]) +
16
+ color("none", :underline => true))
17
+ assert_escape_sequence(["34", "1", "4"],
18
+ color("blue") +
19
+ color("none", :bold => true) +
20
+ color("none", :underline => true))
21
+ end
22
+
23
+ def test_equal
24
+ red = color("red")
25
+ red_bold = color("red", :bold => true)
26
+
27
+ assert_operator(red, :==, red)
28
+ assert_not_equal(red, nil)
29
+ assert_equal(red, color("red"))
30
+ assert_not_equal(red, red_bold)
31
+ end
32
+
33
+ private
34
+ def color(name, options={})
35
+ Test::Unit::Color.new(name, options)
36
+ end
37
+
38
+ def mix_color(colors)
39
+ Test::Unit::MixColor.new(colors)
40
+ end
41
+
42
+ def assert_escape_sequence(expected, color)
43
+ assert_equal(expected, color.sequence)
44
+ assert_match(/\e\[(?:\d+;)*\d+m/, color.escape_sequence)
45
+ assert_equal(expected, color.escape_sequence[2..-2].split(";"))
46
+ end
47
+ end
@@ -0,0 +1,303 @@
1
+ require "testunit-test-util"
2
+
3
+ class TestData < Test::Unit::TestCase
4
+ class Calc
5
+ def initialize
6
+ end
7
+
8
+ def plus(augend, addend)
9
+ augend + addend
10
+ end
11
+ end
12
+
13
+ class TestCalc < Test::Unit::TestCase
14
+ @@testing = false
15
+
16
+ class << self
17
+ def testing=(testing)
18
+ @@testing = testing
19
+ end
20
+ end
21
+
22
+ def valid?
23
+ @@testing
24
+ end
25
+
26
+ def setup
27
+ @calc = Calc.new
28
+ end
29
+
30
+ class TestDataSet < TestCalc
31
+ data("positive positive" => {:expected => 4, :augend => 3, :addend => 1},
32
+ "positive negative" => {:expected => -1, :augend => 1, :addend => -2})
33
+ def test_plus(data)
34
+ assert_equal(data[:expected],
35
+ @calc.plus(data[:augend], data[:addend]))
36
+ end
37
+ end
38
+
39
+ class TestNData < TestCalc
40
+ data("positive positive", {:expected => 4, :augend => 3, :addend => 1})
41
+ data("positive negative", {:expected => -1, :augend => 1, :addend => -2})
42
+ def test_plus(data)
43
+ assert_equal(data[:expected],
44
+ @calc.plus(data[:augend], data[:addend]))
45
+ end
46
+ end
47
+
48
+ class TestDynamicDataSet < TestCalc
49
+ data do
50
+ data_set = {}
51
+ data_set["positive positive"] = {
52
+ :expected => 3,
53
+ :augend => 1,
54
+ :addend => 2
55
+ }
56
+ data_set["positive negative"] = {
57
+ :expected => -1,
58
+ :augend => 1,
59
+ :addend => -2
60
+ }
61
+ data_set
62
+ end
63
+ DATA_PROC = current_attribute(:data)[:value].first
64
+ def test_plus(data)
65
+ assert_equal(data[:expected],
66
+ @calc.plus(data[:augend], data[:addend]))
67
+ end
68
+ end
69
+
70
+ class TestLoadDataSet < TestCalc
71
+ extend TestUnitTestUtil
72
+ load_data(fixture_file_path("plus.csv"))
73
+ def test_plus(data)
74
+ assert_equal(data["expected"],
75
+ @calc.plus(data["augend"], data["addend"]))
76
+ end
77
+ end
78
+
79
+ class TestSuperclass < TestCalc
80
+ data("positive positive" => {:expected => 4, :augend => 3, :addend => 1},
81
+ "positive negative" => {:expected => -1, :augend => 1, :addend => -2})
82
+ def test_plus(data)
83
+ assert_equal(data[:expected],
84
+ @calc.plus(data[:augend], data[:addend]))
85
+ end
86
+
87
+ class TestNormalTestInSubclass < self
88
+ def test_plus
89
+ assert_equal(2, @calc.plus(1, 1))
90
+ end
91
+ end
92
+ end
93
+ end
94
+
95
+ def setup
96
+ TestCalc.testing = true
97
+ end
98
+
99
+ def teardown
100
+ TestCalc.testing = false
101
+ end
102
+
103
+ def test_data_no_arguments_without_block
104
+ assert_raise(ArgumentError) do
105
+ self.class.data
106
+ end
107
+ end
108
+
109
+ data("data set",
110
+ {
111
+ :test_case => TestCalc::TestDataSet,
112
+ :data_set => [{
113
+ "positive positive" => {
114
+ :expected => 4,
115
+ :augend => 3,
116
+ :addend => 1,
117
+ },
118
+ "positive negative" => {
119
+ :expected => -1,
120
+ :augend => 1,
121
+ :addend => -2,
122
+ },
123
+ }],
124
+ })
125
+ data("n-data",
126
+ {
127
+ :test_case => TestCalc::TestNData,
128
+ :data_set => [{
129
+ "positive positive" => {
130
+ :expected => 4,
131
+ :augend => 3,
132
+ :addend => 1,
133
+ },
134
+ },
135
+ {
136
+ "positive negative" => {
137
+ :expected => -1,
138
+ :augend => 1,
139
+ :addend => -2,
140
+ },
141
+ }],
142
+ })
143
+ data("dynamic-data-set",
144
+ {
145
+ :test_case => TestCalc::TestDynamicDataSet,
146
+ :data_set => [TestCalc::TestDynamicDataSet::DATA_PROC],
147
+ })
148
+ data("load-data-set",
149
+ {
150
+ :test_case => TestCalc::TestLoadDataSet,
151
+ :data_set => [{
152
+ "positive positive" => {
153
+ "expected" => 4,
154
+ "augend" => 3,
155
+ "addend" => 1,
156
+ },
157
+ },
158
+ {
159
+ "positive negative" => {
160
+ "expected" => -1,
161
+ "augend" => 1,
162
+ "addend" => -2,
163
+ },
164
+ }],
165
+ })
166
+ def test_data(data)
167
+ test_plus = data[:test_case].new("test_plus")
168
+ assert_equal(data[:data_set], test_plus[:data])
169
+ assert_not_nil(data[:data_set])
170
+ end
171
+
172
+ data("data set" => TestCalc::TestDataSet,
173
+ "n-data" => TestCalc::TestNData,
174
+ "dynamic-data-set" => TestCalc::TestDynamicDataSet,
175
+ "load-data-set" => TestCalc::TestLoadDataSet)
176
+ def test_suite(test_case)
177
+ suite = test_case.suite
178
+ assert_equal(["test_plus[positive negative](#{test_case.name})",
179
+ "test_plus[positive positive](#{test_case.name})"],
180
+ suite.tests.collect {|test| test.name}.sort)
181
+ end
182
+
183
+ data("data set" => TestCalc::TestDataSet,
184
+ "n-data" => TestCalc::TestNData,
185
+ "dynamic-data-set" => TestCalc::TestDynamicDataSet,
186
+ "load-data-set" => TestCalc::TestLoadDataSet,
187
+ "superclass" => TestCalc::TestSuperclass)
188
+ def test_run(test_case)
189
+ result = _run_test(test_case)
190
+ assert_equal("2 tests, 2 assertions, 0 failures, 0 errors, 0 pendings, " \
191
+ "0 omissions, 0 notifications", result.to_s)
192
+ end
193
+
194
+ def test_run_normal_test_in_subclass
195
+ result = _run_test(TestCalc::TestSuperclass::TestNormalTestInSubclass)
196
+ assert_equal("1 tests, 1 assertions, 0 failures, 0 errors, 0 pendings, " \
197
+ "0 omissions, 0 notifications", result.to_s)
198
+ end
199
+
200
+ data("data set" => TestCalc::TestDataSet,
201
+ "n-data" => TestCalc::TestNData,
202
+ "dynamic-data-set" => TestCalc::TestDynamicDataSet,
203
+ "load-data-set" => TestCalc::TestLoadDataSet)
204
+ def test_equal(test_case)
205
+ suite = test_case.suite
206
+ positive_positive_test = suite.tests.find do |test|
207
+ test.data_label == "positive positive"
208
+ end
209
+ suite.tests.delete(positive_positive_test)
210
+ assert_equal(["test_plus[positive negative](#{test_case.name})"],
211
+ suite.tests.collect {|test| test.name}.sort)
212
+ end
213
+
214
+ data("true" => {:expected => true, :target => "true"},
215
+ "false" => {:expected => false, :target => "false"},
216
+ "integer" => {:expected => 1, :target => "1"},
217
+ "float" => {:expected => 1.5, :target => "1.5"},
218
+ "string" => {:expected => "hello", :target => "hello"})
219
+ def test_normalize_value(data)
220
+ loader = Test::Unit::Data::ClassMethods::Loader.new(self)
221
+ assert_equal(data[:expected], loader.__send__(:normalize_value, data[:target]))
222
+ end
223
+
224
+ def _run_test(test_case)
225
+ result = Test::Unit::TestResult.new
226
+ test = test_case.suite
227
+ yield(test) if block_given?
228
+ test.run(result) {}
229
+ result
230
+ end
231
+
232
+ class TestLoadData < Test::Unit::TestCase
233
+ include TestUnitTestUtil
234
+ def test_invalid_csv_file_name
235
+ garbage = "X"
236
+ file_name = "data.csv#{garbage}"
237
+ assert_raise(ArgumentError, "unsupported file format: <#{file_name}>") do
238
+ self.class.load_data(file_name)
239
+ end
240
+ end
241
+
242
+ class TestFileFormat < self
243
+ def setup
244
+ self.class.current_attribute(:data).clear
245
+ end
246
+
247
+ class TestHeader < self
248
+ data("csv" => "header.csv",
249
+ "tsv" => "header.tsv")
250
+ def test_normal(file_name)
251
+ self.class.load_data(fixture_file_path(file_name))
252
+ assert_equal([
253
+ {
254
+ "empty string" => {
255
+ "expected" => true,
256
+ "target" => ""
257
+ }
258
+ },
259
+ {
260
+ "plain string" => {
261
+ "expected" => false,
262
+ "target" => "hello"
263
+ }
264
+ }
265
+ ],
266
+ self.class.current_attribute(:data)[:value])
267
+ end
268
+
269
+ data("csv" => "header-label.csv",
270
+ "tsv" => "header-label.tsv")
271
+ def test_label(file_name)
272
+ self.class.load_data(fixture_file_path(file_name))
273
+ assert_equal([
274
+ {
275
+ "upper case" => {
276
+ "expected" => "HELLO",
277
+ "label" => "HELLO"
278
+ }
279
+ },
280
+ {
281
+ "lower case" => {
282
+ "expected" => "Hello",
283
+ "label" => "hello"
284
+ }
285
+ }
286
+ ],
287
+ self.class.current_attribute(:data)[:value])
288
+ end
289
+ end
290
+
291
+ data("csv" => "no-header.csv",
292
+ "tsv" => "no-header.tsv")
293
+ def test_without_header(file_name)
294
+ self.class.load_data(fixture_file_path(file_name))
295
+ assert_equal([
296
+ {"empty string" => [true, ""]},
297
+ {"plain string" => [false, "hello"]}
298
+ ],
299
+ self.class.current_attribute(:data)[:value])
300
+ end
301
+ end
302
+ end
303
+ end