win32-api 1.6.0-universal-mingw32 → 1.6.1.beta1-universal-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (355) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES +4 -0
  3. data/Gemfile.lock +5 -5
  4. data/Rakefile +45 -19
  5. data/appveyor.yml +12 -0
  6. data/appveyor/build.cmd +3 -0
  7. data/lib/win32/api.rb +8 -0
  8. data/lib/win32/ruby21_32/win32/api.so +0 -0
  9. data/lib/win32/ruby21_64/win32/api.so +0 -0
  10. data/lib/win32/ruby22_32/win32/api.so +0 -0
  11. data/lib/win32/ruby22_64/win32/api.so +0 -0
  12. data/lib/win32/ruby23_32/win32/api.so +0 -0
  13. data/lib/win32/ruby23_64/win32/api.so +0 -0
  14. data/lib/win32/ruby24_32/win32/api.so +0 -0
  15. data/lib/win32/ruby24_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/win32-api.gemspec +1 -1
  19. metadata +8 -341
  20. data/vendor/bundle/ruby/2.2.0/bin/devkit +0 -23
  21. data/vendor/bundle/ruby/2.2.0/bin/devkit.bat +0 -6
  22. data/vendor/bundle/ruby/2.2.0/bin/rake +0 -23
  23. data/vendor/bundle/ruby/2.2.0/bin/rake.bat +0 -6
  24. data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/CHANGELOG +0 -55
  25. data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/LICENSE +0 -339
  26. data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/README.md +0 -73
  27. data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/Rakefile +0 -8
  28. data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/colorize.gemspec +0 -35
  29. data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/lib/colorize.rb +0 -12
  30. data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/lib/colorize/class_methods.rb +0 -116
  31. data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/lib/colorize/instance_methods.rb +0 -135
  32. data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/test/test_colorize.rb +0 -161
  33. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/Gemfile +0 -4
  34. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/LICENSE.txt +0 -22
  35. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/README.md +0 -34
  36. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/Rakefile +0 -1
  37. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/Rspec-example-matchers.txt +0 -184
  38. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/bin/devkit +0 -87
  39. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/devkit.gemspec +0 -27
  40. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/lib/devkit.rb +0 -18
  41. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/lib/devkit/core.rb +0 -53
  42. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/lib/devkit/identity.rb +0 -78
  43. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/lib/devkit/ssh_identity.rb +0 -53
  44. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/lib/devkit/version.rb +0 -3
  45. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/spec/devkit/core_spec.rb +0 -46
  46. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/spec/devkit/identity_spec.rb +0 -1
  47. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/spec/devkit/ssh_identity_spec.rb +0 -1
  48. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/spec/devkit_spec.rb +0 -5
  49. data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/spec/spec_helper.rb +0 -8
  50. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/AUTHORS +0 -3
  51. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/COPYING +0 -339
  52. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/Changelog.md +0 -415
  53. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/Gemfile +0 -9
  54. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/INSTALL +0 -59
  55. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/LICENSE +0 -7
  56. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/README.rdoc +0 -74
  57. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/Rakefile +0 -30
  58. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/TODO +0 -6
  59. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/ansi_colors.rb +0 -38
  60. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/asking_for_arrays.rb +0 -18
  61. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/basic_usage.rb +0 -75
  62. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/color_scheme.rb +0 -32
  63. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/get_character.rb +0 -12
  64. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/limit.rb +0 -12
  65. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/menus.rb +0 -65
  66. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/overwrite.rb +0 -19
  67. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/page_and_wrap.rb +0 -322
  68. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/password.rb +0 -7
  69. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/repeat_entry.rb +0 -21
  70. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/trapping_eof.rb +0 -22
  71. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/using_readline.rb +0 -17
  72. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/highline.gemspec +0 -37
  73. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline.rb +0 -1048
  74. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/color_scheme.rb +0 -134
  75. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/compatibility.rb +0 -16
  76. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/import.rb +0 -41
  77. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/menu.rb +0 -381
  78. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/question.rb +0 -480
  79. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/simulate.rb +0 -48
  80. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/style.rb +0 -192
  81. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/version.rb +0 -4
  82. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/setup.rb +0 -1360
  83. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/site/highline.css +0 -65
  84. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/site/images/logo.png +0 -0
  85. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/site/index.html +0 -58
  86. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/string_methods.rb +0 -32
  87. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_color_scheme.rb +0 -96
  88. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_highline.rb +0 -1402
  89. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_import.rb +0 -52
  90. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_menu.rb +0 -439
  91. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_simulator.rb +0 -23
  92. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_string_highline.rb +0 -38
  93. data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_style.rb +0 -578
  94. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/BSDL +0 -22
  95. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/COPYING +0 -57
  96. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/Gemfile +0 -9
  97. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/LEGAL +0 -4
  98. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/README.rdoc +0 -19
  99. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/Rakefile +0 -16
  100. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/benchmarks/bm_yhpg.rb +0 -59
  101. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/benchmarks/helper.rb +0 -8
  102. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/lib/power_assert.rb +0 -338
  103. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/lib/power_assert/enable_tracepoint_events.rb +0 -82
  104. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/lib/power_assert/version.rb +0 -3
  105. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/power_assert.gemspec +0 -23
  106. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/test/helper.rb +0 -10
  107. data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/test/test_power_assert.rb +0 -512
  108. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/CONTRIBUTING.rdoc +0 -38
  109. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/History.rdoc +0 -719
  110. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/MIT-LICENSE +0 -21
  111. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/Manifest.txt +0 -154
  112. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/README.rdoc +0 -157
  113. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/Rakefile +0 -82
  114. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/bin/rake +0 -33
  115. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/command_line_usage.rdoc +0 -158
  116. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/example/Rakefile1 +0 -38
  117. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/example/Rakefile2 +0 -35
  118. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/example/a.c +0 -6
  119. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/example/b.c +0 -6
  120. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/example/main.c +0 -11
  121. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/glossary.rdoc +0 -42
  122. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/jamis.rb +0 -591
  123. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/proto_rake.rdoc +0 -127
  124. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/rake.1 +0 -141
  125. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/rakefile.rdoc +0 -624
  126. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/rational.rdoc +0 -151
  127. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.4.14.rdoc +0 -23
  128. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.4.15.rdoc +0 -35
  129. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.5.0.rdoc +0 -53
  130. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.5.3.rdoc +0 -78
  131. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.5.4.rdoc +0 -46
  132. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.6.0.rdoc +0 -141
  133. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.7.0.rdoc +0 -119
  134. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.7.1.rdoc +0 -59
  135. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.7.2.rdoc +0 -121
  136. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.7.3.rdoc +0 -47
  137. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.0.rdoc +0 -114
  138. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.2.rdoc +0 -165
  139. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.3.rdoc +0 -112
  140. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.4.rdoc +0 -147
  141. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.5.rdoc +0 -53
  142. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.6.rdoc +0 -37
  143. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.7.rdoc +0 -55
  144. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.0.rdoc +0 -112
  145. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.1.rdoc +0 -52
  146. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.2.2.rdoc +0 -55
  147. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.2.rdoc +0 -49
  148. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.3.rdoc +0 -102
  149. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.4.rdoc +0 -60
  150. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.5.rdoc +0 -55
  151. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.6.rdoc +0 -64
  152. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-10.0.0.rdoc +0 -178
  153. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-10.0.1.rdoc +0 -58
  154. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-10.0.2.rdoc +0 -53
  155. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-10.0.3.rdoc +0 -191
  156. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-10.1.0.rdoc +0 -61
  157. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake.rb +0 -73
  158. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/application.rb +0 -787
  159. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/backtrace.rb +0 -23
  160. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/clean.rb +0 -76
  161. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/cloneable.rb +0 -16
  162. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/contrib/compositepublisher.rb +0 -21
  163. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/contrib/ftptools.rb +0 -137
  164. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/contrib/sshpublisher.rb +0 -60
  165. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/cpu_counter.rb +0 -120
  166. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/default_loader.rb +0 -14
  167. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/dsl_definition.rb +0 -194
  168. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/early_time.rb +0 -21
  169. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/file_creation_task.rb +0 -24
  170. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/file_list.rb +0 -436
  171. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/file_task.rb +0 -46
  172. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/file_utils.rb +0 -123
  173. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/invocation_chain.rb +0 -56
  174. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/invocation_exception_mixin.rb +0 -16
  175. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/late_time.rb +0 -17
  176. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/linked_list.rb +0 -111
  177. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/loaders/makefile.rb +0 -53
  178. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/multi_task.rb +0 -13
  179. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/name_space.rb +0 -38
  180. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/packagetask.rb +0 -199
  181. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/phony.rb +0 -15
  182. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/private_reader.rb +0 -20
  183. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/promise.rb +0 -99
  184. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/pseudo_status.rb +0 -29
  185. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/rake_module.rb +0 -38
  186. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/rake_test_loader.rb +0 -22
  187. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/rule_recursion_overflow_error.rb +0 -20
  188. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/scope.rb +0 -42
  189. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/task.rb +0 -391
  190. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/task_argument_error.rb +0 -7
  191. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/task_arguments.rb +0 -102
  192. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/task_manager.rb +0 -316
  193. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/tasklib.rb +0 -11
  194. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/testtask.rb +0 -204
  195. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/thread_history_display.rb +0 -48
  196. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/thread_pool.rb +0 -163
  197. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/trace_output.rb +0 -22
  198. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/version.rb +0 -7
  199. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/win32.rb +0 -50
  200. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/rakelib/test_times.rake +0 -25
  201. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/file_creation.rb +0 -34
  202. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/helper.rb +0 -134
  203. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/support/rakefile_definitions.rb +0 -476
  204. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/support/ruby_runner.rb +0 -34
  205. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_private_reader.rb +0 -42
  206. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake.rb +0 -40
  207. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_application.rb +0 -659
  208. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_application_options.rb +0 -468
  209. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_backtrace.rb +0 -119
  210. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_clean.rb +0 -61
  211. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_cpu_counter.rb +0 -68
  212. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_definitions.rb +0 -84
  213. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_directory_task.rb +0 -76
  214. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_dsl.rb +0 -40
  215. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_early_time.rb +0 -31
  216. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_creation_task.rb +0 -56
  217. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_list.rb +0 -687
  218. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_list_path_map.rb +0 -15
  219. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_task.rb +0 -197
  220. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_utils.rb +0 -318
  221. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_ftp_file.rb +0 -74
  222. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_functional.rb +0 -484
  223. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_invocation_chain.rb +0 -64
  224. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_late_time.rb +0 -18
  225. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_linked_list.rb +0 -84
  226. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_makefile_loader.rb +0 -46
  227. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_multi_task.rb +0 -64
  228. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_name_space.rb +0 -57
  229. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_package_task.rb +0 -79
  230. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_path_map.rb +0 -168
  231. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_path_map_explode.rb +0 -34
  232. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_path_map_partial.rb +0 -18
  233. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_pseudo_status.rb +0 -21
  234. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_rake_test_loader.rb +0 -20
  235. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_reduce_compat.rb +0 -26
  236. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_require.rb +0 -40
  237. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_rules.rb +0 -388
  238. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_scope.rb +0 -44
  239. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task.rb +0 -430
  240. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task_argument_parsing.rb +0 -119
  241. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task_arguments.rb +0 -134
  242. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task_manager.rb +0 -178
  243. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task_manager_argument_resolution.rb +0 -19
  244. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task_with_arguments.rb +0 -172
  245. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_test_task.rb +0 -130
  246. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_thread_pool.rb +0 -145
  247. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_top_level_functions.rb +0 -71
  248. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_win32.rb +0 -72
  249. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_thread_history_display.rb +0 -101
  250. data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_trace_output.rb +0 -52
  251. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/COPYING +0 -64
  252. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/GPL +0 -339
  253. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/LGPL +0 -502
  254. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/PSFL +0 -271
  255. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/README.md +0 -101
  256. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/Rakefile +0 -71
  257. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test-unit.rb +0 -34
  258. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit.rb +0 -505
  259. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/assertion-failed-error.rb +0 -25
  260. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/assertions.rb +0 -2218
  261. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/attribute-matcher.rb +0 -26
  262. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/attribute.rb +0 -158
  263. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/auto-runner-loader.rb +0 -17
  264. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/autorunner.rb +0 -536
  265. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/code-snippet-fetcher.rb +0 -58
  266. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector.rb +0 -73
  267. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector/descendant.rb +0 -19
  268. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector/dir.rb +0 -108
  269. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector/load.rb +0 -202
  270. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector/objectspace.rb +0 -34
  271. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector/xml.rb +0 -249
  272. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/color-scheme.rb +0 -198
  273. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/color.rb +0 -134
  274. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/data.rb +0 -262
  275. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/diff.rb +0 -746
  276. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/error.rb +0 -158
  277. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/exception-handler.rb +0 -82
  278. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/failure.rb +0 -169
  279. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/fault-location-detector.rb +0 -100
  280. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/fixture.rb +0 -295
  281. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/notification.rb +0 -136
  282. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/omission.rb +0 -195
  283. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/pending.rb +0 -154
  284. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/priority.rb +0 -192
  285. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/runner/console.rb +0 -59
  286. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/runner/emacs.rb +0 -8
  287. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/runner/xml.rb +0 -15
  288. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/test-suite-creator.rb +0 -89
  289. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/testcase.rb +0 -811
  290. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/testresult.rb +0 -132
  291. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/testsuite.rb +0 -175
  292. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/console/outputlevel.rb +0 -15
  293. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/console/testrunner.rb +0 -693
  294. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/emacs/testrunner.rb +0 -49
  295. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/testrunner.rb +0 -53
  296. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/testrunnermediator.rb +0 -114
  297. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/testrunnerutilities.rb +0 -41
  298. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/xml/testrunner.rb +0 -224
  299. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/util/backtracefilter.rb +0 -59
  300. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/util/method-owner-finder.rb +0 -28
  301. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/util/observable.rb +0 -90
  302. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/util/output.rb +0 -31
  303. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/util/procwrapper.rb +0 -48
  304. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/version.rb +0 -5
  305. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/sample/adder.rb +0 -13
  306. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/sample/subtracter.rb +0 -12
  307. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/sample/test_adder.rb +0 -20
  308. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/sample/test_subtracter.rb +0 -20
  309. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/sample/test_user.rb +0 -23
  310. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/collector/test-descendant.rb +0 -178
  311. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/collector/test-load.rb +0 -442
  312. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/collector/test_dir.rb +0 -406
  313. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/collector/test_objectspace.rb +0 -100
  314. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/header-label.csv +0 -3
  315. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/header-label.tsv +0 -3
  316. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/header.csv +0 -3
  317. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/header.tsv +0 -3
  318. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/no-header.csv +0 -2
  319. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/no-header.tsv +0 -2
  320. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/plus.csv +0 -3
  321. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/run-test.rb +0 -22
  322. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-assertions.rb +0 -2160
  323. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-attribute-matcher.rb +0 -38
  324. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-attribute.rb +0 -123
  325. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-code-snippet.rb +0 -37
  326. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-color-scheme.rb +0 -82
  327. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-color.rb +0 -47
  328. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-data.rb +0 -303
  329. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-diff.rb +0 -518
  330. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-emacs-runner.rb +0 -60
  331. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-error.rb +0 -26
  332. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-failure.rb +0 -33
  333. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-fault-location-detector.rb +0 -163
  334. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-fixture.rb +0 -713
  335. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-notification.rb +0 -33
  336. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-omission.rb +0 -81
  337. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-pending.rb +0 -70
  338. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-priority.rb +0 -173
  339. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-test-case.rb +0 -1171
  340. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-test-result.rb +0 -113
  341. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-test-suite-creator.rb +0 -97
  342. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-test-suite.rb +0 -150
  343. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/testunit-test-util.rb +0 -31
  344. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/ui/test_testrunmediator.rb +0 -20
  345. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/util/test-method-owner-finder.rb +0 -38
  346. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/util/test-output.rb +0 -11
  347. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/util/test_backtracefilter.rb +0 -52
  348. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/util/test_observable.rb +0 -102
  349. data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/util/test_procwrapper.rb +0 -36
  350. data/vendor/bundle/ruby/2.2.0/specifications/colorize-0.7.7.gemspec +0 -38
  351. data/vendor/bundle/ruby/2.2.0/specifications/devkit-0.1.0.gemspec +0 -46
  352. data/vendor/bundle/ruby/2.2.0/specifications/highline-1.7.8.gemspec +0 -37
  353. data/vendor/bundle/ruby/2.2.0/specifications/power_assert-0.3.0.gemspec +0 -41
  354. data/vendor/bundle/ruby/2.2.0/specifications/rake-11.1.2.gemspec +0 -43
  355. data/vendor/bundle/ruby/2.2.0/specifications/test-unit-3.1.9.gemspec +0 -47
@@ -1,23 +0,0 @@
1
- require 'test/unit'
2
- require 'highline/import'
3
- require 'highline/simulate'
4
-
5
- class SimulatorTest < Test::Unit::TestCase
6
- def setup
7
- input = StringIO.new
8
- output = StringIO.new
9
- $terminal = HighLine.new(input, output)
10
- end
11
-
12
- def test_simulator
13
- HighLine::Simulate.with('Bugs Bunny', '18') do
14
- name = ask('What is your name?')
15
-
16
- assert_equal 'Bugs Bunny', name
17
-
18
- age = ask('What is your age?')
19
-
20
- assert_equal '18', age
21
- end
22
- end
23
- end
@@ -1,38 +0,0 @@
1
- # tc_highline_string.rb
2
- #
3
- # Created by Richard LeBer 2011-06-27
4
- #
5
- # This is Free Software. See LICENSE and COPYING for details.
6
-
7
- require "test/unit"
8
-
9
- require "highline"
10
- require "stringio"
11
- require "string_methods"
12
-
13
- class TestHighLineString < Test::Unit::TestCase
14
- def setup
15
- @string = HighLine::String.new("string")
16
- end
17
-
18
- def test_string_class
19
- # Basic constructor
20
- assert_equal HighLine::String, @string.class
21
- assert_equal "string", @string
22
-
23
- # Alternative constructor method
24
- new_string = HighLine::String("string")
25
- assert_equal HighLine::String, new_string.class
26
- assert_equal @string, new_string
27
-
28
- # String methods work
29
- assert_equal 6, @string.size
30
- assert_equal "STRING", @string.upcase
31
- end
32
-
33
- include StringMethods
34
-
35
- def test_string_class_is_unchanged
36
- assert_raise(::NoMethodError) { "string".color(:blue) }
37
- end
38
- end
@@ -1,578 +0,0 @@
1
- # tc_style.rb
2
- #
3
- # Created by Richard LeBer on 2011-06-11.
4
- #
5
- # This is Free Software. See LICENSE and COPYING for details.
6
-
7
- require "test/unit"
8
-
9
- require "highline"
10
- require "stringio"
11
-
12
- class TestStyle < Test::Unit::TestCase
13
-
14
- def setup
15
- @input = StringIO.new
16
- @output = StringIO.new
17
- @terminal = HighLine.new(@input, @output)
18
- @style1 = HighLine::Style.new(:name=>:foo, :code=>"\e[99m", :rgb=>[1,2,3])
19
- @style2 = HighLine::Style.new(:name=>:lando, :code=>"\e[98m")
20
- @style3 = HighLine::Style.new(:name=>[:foo, :lando], :list=>[:foo, :lando])
21
- @style4 = HighLine::Style(:rgb_654321)
22
- end
23
-
24
- def teardown
25
- # HighLine::Style.clear_index
26
- end
27
-
28
- def test_style_method
29
- # Retrieve a style from an existing Style (no new Style created)
30
- new_style = @style1.dup # This will replace @style1 in the indexes
31
- s = HighLine.Style(@style1)
32
- assert_instance_of HighLine::Style, s
33
- assert_same new_style, s # i.e. s===the latest style created, but not the one searched for
34
-
35
- # Retrieve a style from a new Style (no new Style created)
36
- s2 = HighLine::Style.new(:name=>:bar, :code=>"\e[97m")
37
- s = HighLine.Style(s2)
38
- assert_instance_of HighLine::Style, s
39
- assert_same s2, s
40
-
41
- # Create a builtin style from an existing ANSI escape string
42
- s = HighLine.Style("\e[1m")
43
- assert_instance_of HighLine::Style, s
44
- assert_nil s.list
45
- assert_equal "\e[1m", s.code
46
- assert_equal :bold, s.name
47
-
48
- # Create a builtin style from a new ANSI escape string
49
- s = HighLine.Style("\e[96m")
50
- assert_instance_of HighLine::Style, s
51
- assert_nil s.list
52
- assert_equal "\e[96m", s.code
53
-
54
- # Create a builtin style from a symbol
55
- s = HighLine.Style(:red)
56
- assert_instance_of HighLine::Style, s
57
- assert_nil s.list
58
- assert_equal :red, s.name
59
-
60
- # Retrieve an existing style by name (no new Style created)
61
- s = HighLine.Style(@style2.name)
62
- assert_instance_of HighLine::Style, s
63
- assert_same @style2, s
64
-
65
- # See below for color scheme tests
66
-
67
- # Create style from a Hash
68
- s = HighLine.Style(:name=>:han, :code=>"blah", :rgb=>'phooey')
69
- assert_instance_of HighLine::Style, s
70
- assert_equal :han, s.name
71
- assert_equal "blah", s.code
72
- assert_equal "phooey", s.rgb
73
-
74
- # Create style from an RGB foreground color code
75
- s = HighLine.Style(:rgb_1f2e3d)
76
- assert_instance_of HighLine::Style, s
77
- assert_equal :rgb_1f2e3d, s.name
78
- assert_equal "\e[38;5;23m", s.code # Trust me; more testing below
79
- assert_equal [31,46,61], s.rgb # 0x1f==31, 0x2e==46, 0x3d=61
80
-
81
- # Create style from an RGB background color code
82
- s = HighLine.Style(:on_rgb_1f2e3d)
83
- assert_instance_of HighLine::Style, s
84
- assert_equal :on_rgb_1f2e3d, s.name
85
- assert_equal "\e[48;5;23m", s.code # Trust me; more testing below
86
- assert_equal [31,46,61], s.rgb # 0x1f==31, 0x2e==46, 0x3d=61
87
-
88
- # Create a style list
89
- s1 = HighLine.Style(:bold, :red)
90
- assert_instance_of HighLine::Style, s1
91
- assert_equal [:bold, :red], s1.list
92
-
93
- # Find an existing style list
94
- s2 = HighLine.Style(:bold, :red)
95
- assert_instance_of HighLine::Style, s2
96
- assert_same s1, s2
97
-
98
- # Create a style list with nils
99
- s1 = HighLine.Style(:underline, nil, :blue)
100
- assert_instance_of HighLine::Style, s1
101
- assert_equal [:underline, :blue], s1.list
102
-
103
- # Raise an error for an undefined style
104
- assert_raise(::NameError) { HighLine.Style(:fubar) }
105
- end
106
-
107
- def test_no_color_scheme
108
- HighLine.color_scheme = nil
109
- assert_raise(::NameError) { HighLine.Style(:critical) }
110
- end
111
-
112
- def test_with_color_scheme
113
- HighLine.color_scheme = HighLine::SampleColorScheme.new
114
- s = HighLine.Style(:critical)
115
- assert_instance_of HighLine::Style, s
116
- assert_equal :critical, s.name
117
- assert_equal [:yellow, :on_red], s.list
118
- end
119
-
120
- def test_builtin_foreground_colors_defined
121
- HighLine::COLORS.each do |color|
122
- style = HighLine.const_get(color+'_STYLE')
123
- assert_instance_of HighLine::Style, style
124
- assert_equal color.downcase.to_sym, style.name
125
- assert style.builtin
126
- code = HighLine.const_get(color)
127
- assert_instance_of String, code, "Bad code for #{color}"
128
- end
129
- end
130
-
131
- def test_builtin_background_colors_defined
132
- HighLine::COLORS.each do |color|
133
- style = HighLine.const_get('ON_' + color+'_STYLE')
134
- assert_instance_of HighLine::Style, style
135
- assert_equal "ON_#{color}".downcase.to_sym, style.name
136
- assert style.builtin
137
- code = HighLine.const_get('ON_' + color)
138
- assert_instance_of String, code, "Bad code for ON_#{color}"
139
- end
140
- end
141
-
142
- def test_builtin_styles_defined
143
- HighLine::STYLES.each do |style_constant|
144
- style = HighLine.const_get(style_constant+'_STYLE')
145
- assert_instance_of HighLine::Style, style
146
- assert_equal style_constant.downcase.to_sym, style.name
147
- assert style.builtin
148
- code = HighLine.const_get(style_constant)
149
- assert_instance_of String, code, "Bad code for #{style_constant}"
150
- end
151
- end
152
-
153
- def test_index
154
- # Add a Style with a new name and code
155
- assert_nil HighLine::Style.list[:s1]
156
- assert_nil HighLine::Style.code_index['foo']
157
- s1 = HighLine::Style.new(:name=>:s1, :code=>'foo')
158
- assert_not_nil HighLine::Style.list[:s1]
159
- assert_same s1, HighLine::Style.list[:s1]
160
- assert_equal :s1, HighLine::Style.list[:s1].name
161
- assert_equal 'foo', HighLine::Style.list[:s1].code
162
- styles = HighLine::Style.list.size
163
- codes = HighLine::Style.code_index.size
164
- assert_instance_of Array, HighLine::Style.code_index['foo']
165
- assert_equal 1, HighLine::Style.code_index['foo'].size
166
- assert_same s1, HighLine::Style.code_index['foo'].last
167
- assert_equal :s1, HighLine::Style.code_index['foo'].last.name
168
- assert_equal 'foo', HighLine::Style.code_index['foo'].last.code
169
-
170
- # Add another Style with a new name and code
171
- assert_nil HighLine::Style.list[:s2]
172
- assert_nil HighLine::Style.code_index['bar']
173
- s2 = HighLine::Style.new(:name=>:s2, :code=>'bar')
174
- assert_equal styles+1, HighLine::Style.list.size
175
- assert_equal codes+1, HighLine::Style.code_index.size
176
- assert_not_nil HighLine::Style.list[:s2]
177
- assert_same s2, HighLine::Style.list[:s2]
178
- assert_equal :s2, HighLine::Style.list[:s2].name
179
- assert_equal 'bar', HighLine::Style.list[:s2].code
180
- assert_instance_of Array, HighLine::Style.code_index['bar']
181
- assert_equal 1, HighLine::Style.code_index['bar'].size
182
- assert_same s2, HighLine::Style.code_index['bar'].last
183
- assert_equal :s2, HighLine::Style.code_index['bar'].last.name
184
- assert_equal 'bar', HighLine::Style.code_index['bar'].last.code
185
-
186
- # Add a Style with an existing name
187
- s3_before = HighLine::Style.list[:s2]
188
- assert_not_nil HighLine::Style.list[:s2]
189
- assert_nil HighLine::Style.code_index['baz']
190
- s3 = HighLine::Style.new(:name=>:s2, :code=>'baz')
191
- assert_not_same s2, s3
192
- assert_not_same s3_before, s3
193
- assert_equal styles+1, HighLine::Style.list.size
194
- assert_equal codes+2, HighLine::Style.code_index.size
195
- assert_not_nil HighLine::Style.list[:s2]
196
- assert_same s3, HighLine::Style.list[:s2]
197
- assert_not_same s2, HighLine::Style.list[:s2]
198
- assert_equal :s2, HighLine::Style.list[:s2].name
199
- assert_equal 'baz', HighLine::Style.list[:s2].code
200
- assert_instance_of Array, HighLine::Style.code_index['baz']
201
- assert_equal 1, HighLine::Style.code_index['baz'].size
202
- assert_same s3, HighLine::Style.code_index['baz'].last
203
- assert_equal :s2, HighLine::Style.code_index['baz'].last.name
204
- assert_equal 'baz', HighLine::Style.code_index['baz'].last.code
205
-
206
- # Add a Style with an existing code
207
- assert_equal 1, HighLine::Style.code_index['baz'].size
208
- s4 = HighLine::Style.new(:name=>:s4, :code=>'baz')
209
- assert_equal styles+2, HighLine::Style.list.size
210
- assert_equal codes+2, HighLine::Style.code_index.size
211
- assert_not_nil HighLine::Style.list[:s4]
212
- assert_same s4, HighLine::Style.list[:s4]
213
- assert_equal :s4, HighLine::Style.list[:s4].name
214
- assert_equal 'baz', HighLine::Style.list[:s4].code
215
- assert_equal 2, HighLine::Style.code_index['baz'].size
216
- assert_same s3, HighLine::Style.code_index['baz'].first # Unchanged from last time
217
- assert_equal :s2, HighLine::Style.code_index['baz'].first.name # Unchanged from last time
218
- assert_equal 'baz', HighLine::Style.code_index['baz'].first.code # Unchanged from last time
219
- assert_same s4, HighLine::Style.code_index['baz'].last
220
- assert_equal :s4, HighLine::Style.code_index['baz'].last.name
221
- assert_equal 'baz', HighLine::Style.code_index['baz'].last.code
222
- end
223
-
224
- def test_rgb_hex
225
- assert_equal "abcdef", HighLine::Style.rgb_hex("abcdef")
226
- assert_equal "ABCDEF", HighLine::Style.rgb_hex("AB","CD","EF")
227
- assert_equal "010203", HighLine::Style.rgb_hex(1,2,3)
228
- assert_equal "123456", HighLine::Style.rgb_hex(18,52,86)
229
- end
230
-
231
- def test_rgb_parts
232
- assert_equal [1,2,3], HighLine::Style.rgb_parts("010203")
233
- assert_equal [18,52,86], HighLine::Style.rgb_parts("123456")
234
- end
235
-
236
- def test_rgb
237
- s = HighLine::Style.rgb(1, 2, 3)
238
- assert_instance_of HighLine::Style, s
239
- assert_equal :rgb_010203, s.name
240
- assert_equal [1,2,3], s.rgb
241
- assert_equal "\e[38;5;16m", s.code
242
-
243
- s = HighLine::Style.rgb("12", "34","56")
244
- assert_instance_of HighLine::Style, s
245
- assert_equal :rgb_123456, s.name
246
- assert_equal [0x12, 0x34, 0x56], s.rgb
247
- assert_equal "\e[38;5;24m", s.code
248
-
249
- s = HighLine::Style.rgb("abcdef")
250
- assert_instance_of HighLine::Style, s
251
- assert_equal :rgb_abcdef, s.name
252
- assert_equal [0xab, 0xcd, 0xef], s.rgb
253
- assert_equal "\e[38;5;189m", s.code
254
- end
255
-
256
- def test_rgb_number
257
- # ANSI RGB coding splits 0..255 into equal sixths, and then the
258
- # red green and blue are encoded in base 6, plus 16, i.e.
259
- # 16 + 36*(red_level) + 6*(green_level) + blue_level,
260
- # where each of red_level, green_level, and blue_level are in
261
- # the range 0..5
262
-
263
- # This test logic works because 42 is just below 1/6 of 255,
264
- # and 43 is just above
265
-
266
- assert_equal 16 + 0*36 + 0*6 + 0, HighLine::Style.rgb_number( 0, 0, 0)
267
- assert_equal 16 + 0*36 + 0*6 + 0, HighLine::Style.rgb_number( 0, 0, 42)
268
- assert_equal 16 + 0*36 + 0*6 + 1, HighLine::Style.rgb_number( 0, 0, 43)
269
-
270
- assert_equal 16 + 0*36 + 0*6 + 0, HighLine::Style.rgb_number( 0, 42, 0)
271
- assert_equal 16 + 0*36 + 0*6 + 0, HighLine::Style.rgb_number( 0, 42, 42)
272
- assert_equal 16 + 0*36 + 0*6 + 1, HighLine::Style.rgb_number( 0, 42, 43)
273
-
274
- assert_equal 16 + 0*36 + 1*6 + 0, HighLine::Style.rgb_number( 0, 43, 0)
275
- assert_equal 16 + 0*36 + 1*6 + 0, HighLine::Style.rgb_number( 0, 43, 42)
276
- assert_equal 16 + 0*36 + 1*6 + 1, HighLine::Style.rgb_number( 0, 43, 43)
277
-
278
- assert_equal 16 + 0*36 + 0*6 + 0, HighLine::Style.rgb_number( 42, 0, 0)
279
- assert_equal 16 + 0*36 + 0*6 + 0, HighLine::Style.rgb_number( 42, 0, 42)
280
- assert_equal 16 + 0*36 + 0*6 + 1, HighLine::Style.rgb_number( 42, 0, 43)
281
-
282
- assert_equal 16 + 0*36 + 0*6 + 0, HighLine::Style.rgb_number( 42, 42, 0)
283
- assert_equal 16 + 0*36 + 0*6 + 0, HighLine::Style.rgb_number( 42, 42, 42)
284
- assert_equal 16 + 0*36 + 0*6 + 1, HighLine::Style.rgb_number( 42, 42, 43)
285
-
286
- assert_equal 16 + 0*36 + 1*6 + 0, HighLine::Style.rgb_number( 42, 43, 0)
287
- assert_equal 16 + 0*36 + 1*6 + 0, HighLine::Style.rgb_number( 42, 43, 42)
288
- assert_equal 16 + 0*36 + 1*6 + 1, HighLine::Style.rgb_number( 42, 43, 43)
289
-
290
- assert_equal 16 + 1*36 + 0*6 + 0, HighLine::Style.rgb_number( 43, 0, 0)
291
- assert_equal 16 + 1*36 + 0*6 + 0, HighLine::Style.rgb_number( 43, 0, 42)
292
- assert_equal 16 + 1*36 + 0*6 + 1, HighLine::Style.rgb_number( 43, 0, 43)
293
-
294
- assert_equal 16 + 1*36 + 0*6 + 0, HighLine::Style.rgb_number( 43, 42, 0)
295
- assert_equal 16 + 1*36 + 0*6 + 0, HighLine::Style.rgb_number( 43, 42, 42)
296
- assert_equal 16 + 1*36 + 0*6 + 1, HighLine::Style.rgb_number( 43, 42, 43)
297
-
298
- assert_equal 16 + 1*36 + 1*6 + 0, HighLine::Style.rgb_number( 43, 43, 0)
299
- assert_equal 16 + 1*36 + 1*6 + 0, HighLine::Style.rgb_number( 43, 43, 42)
300
- assert_equal 16 + 1*36 + 1*6 + 1, HighLine::Style.rgb_number( 43, 43, 43)
301
-
302
- assert_equal 16 + 5*36 + 5*6 + 5, HighLine::Style.rgb_number(255,255,255)
303
- end
304
-
305
- def test_ansi_rgb_to_hex
306
- assert_equal "000000", HighLine::Style.ansi_rgb_to_hex(16 + 0*36 + 0*6 + 0)
307
- assert_equal "000000", HighLine::Style.ansi_rgb_to_hex(16 + 0*36 + 0*6 + 0)
308
- assert_equal "00002b", HighLine::Style.ansi_rgb_to_hex(16 + 0*36 + 0*6 + 1)
309
-
310
- assert_equal "000000", HighLine::Style.ansi_rgb_to_hex(16 + 0*36 + 0*6 + 0)
311
- assert_equal "000000", HighLine::Style.ansi_rgb_to_hex(16 + 0*36 + 0*6 + 0)
312
- assert_equal "00002b", HighLine::Style.ansi_rgb_to_hex(16 + 0*36 + 0*6 + 1)
313
-
314
- assert_equal "002b00", HighLine::Style.ansi_rgb_to_hex(16 + 0*36 + 1*6 + 0)
315
- assert_equal "002b00", HighLine::Style.ansi_rgb_to_hex(16 + 0*36 + 1*6 + 0)
316
- assert_equal "002b2b", HighLine::Style.ansi_rgb_to_hex(16 + 0*36 + 1*6 + 1)
317
-
318
- assert_equal "000000", HighLine::Style.ansi_rgb_to_hex(16 + 0*36 + 0*6 + 0)
319
- assert_equal "000000", HighLine::Style.ansi_rgb_to_hex(16 + 0*36 + 0*6 + 0)
320
- assert_equal "00002b", HighLine::Style.ansi_rgb_to_hex(16 + 0*36 + 0*6 + 1)
321
-
322
- assert_equal "000000", HighLine::Style.ansi_rgb_to_hex(16 + 0*36 + 0*6 + 0)
323
- assert_equal "000000", HighLine::Style.ansi_rgb_to_hex(16 + 0*36 + 0*6 + 0)
324
- assert_equal "00002b", HighLine::Style.ansi_rgb_to_hex(16 + 0*36 + 0*6 + 1)
325
-
326
- assert_equal "002b00", HighLine::Style.ansi_rgb_to_hex(16 + 0*36 + 1*6 + 0)
327
- assert_equal "002b00", HighLine::Style.ansi_rgb_to_hex(16 + 0*36 + 1*6 + 0)
328
- assert_equal "002b2b", HighLine::Style.ansi_rgb_to_hex(16 + 0*36 + 1*6 + 1)
329
-
330
- assert_equal "2b0000", HighLine::Style.ansi_rgb_to_hex(16 + 1*36 + 0*6 + 0)
331
- assert_equal "2b0000", HighLine::Style.ansi_rgb_to_hex(16 + 1*36 + 0*6 + 0)
332
- assert_equal "2b002b", HighLine::Style.ansi_rgb_to_hex(16 + 1*36 + 0*6 + 1)
333
-
334
- assert_equal "2b0000", HighLine::Style.ansi_rgb_to_hex(16 + 1*36 + 0*6 + 0)
335
- assert_equal "2b0000", HighLine::Style.ansi_rgb_to_hex(16 + 1*36 + 0*6 + 0)
336
- assert_equal "2b002b", HighLine::Style.ansi_rgb_to_hex(16 + 1*36 + 0*6 + 1)
337
-
338
- assert_equal "2b2b00", HighLine::Style.ansi_rgb_to_hex(16 + 1*36 + 1*6 + 0)
339
- assert_equal "2b2b00", HighLine::Style.ansi_rgb_to_hex(16 + 1*36 + 1*6 + 0)
340
- assert_equal "2b2b2b", HighLine::Style.ansi_rgb_to_hex(16 + 1*36 + 1*6 + 1)
341
-
342
- # 0xd5 is the smallest number where n/255.0*6.0 > 5
343
- assert_equal "d5d5d5", HighLine::Style.ansi_rgb_to_hex(16 + 5*36 + 5*6 + 5)
344
- end
345
-
346
- def test_list
347
- list_size = HighLine::Style.list.size
348
- # Add a Style with a new name and code
349
- assert_nil HighLine::Style.list[:s5]
350
- s5 = HighLine::Style.new(:name=>:s5, :code=>'foo')
351
- assert_not_nil HighLine::Style.list[:s5]
352
- assert_equal list_size+1, HighLine::Style.list.size
353
- assert_not_nil HighLine::Style.list[:s5]
354
- assert_same s5, HighLine::Style.list[:s5]
355
- assert_equal :s5, HighLine::Style.list[:s5].name
356
- assert_equal 'foo', HighLine::Style.list[:s5].code
357
-
358
- # Add another Style with a new name and code
359
- assert_nil HighLine::Style.list[:s6]
360
- s6 = HighLine::Style.new(:name=>:s6, :code=>'bar')
361
- assert_equal list_size+2, HighLine::Style.list.size
362
- assert_not_nil HighLine::Style.list[:s6]
363
- assert_same s6, HighLine::Style.list[:s6]
364
- assert_equal :s6, HighLine::Style.list[:s6].name
365
- assert_equal 'bar', HighLine::Style.list[:s6].code
366
-
367
- # Add a Style with an existing name
368
- s7 = HighLine::Style.new(:name=>:s6, :code=>'baz')
369
- assert_equal list_size+2, HighLine::Style.list.size # No net addition to list
370
- assert_not_nil HighLine::Style.list[:s6]
371
- assert_same s7, HighLine::Style.list[:s6] # New one replaces old one
372
- assert_not_same s6, HighLine::Style.list[:s6]
373
- assert_equal :s6, HighLine::Style.list[:s6].name
374
- assert_equal 'baz', HighLine::Style.list[:s6].code
375
- end
376
-
377
- def test_code_index
378
- list_size = HighLine::Style.code_index.size
379
-
380
- # Add a Style with a new name and code
381
- assert_nil HighLine::Style.code_index['chewie']
382
- HighLine::Style.new(:name=>:s8, :code=>'chewie')
383
- assert_equal list_size+1, HighLine::Style.code_index.size
384
- assert_instance_of Array, HighLine::Style.code_index['chewie']
385
- assert_equal 1, HighLine::Style.code_index['chewie'].size
386
- assert_equal :s8, HighLine::Style.code_index['chewie'].last.name
387
- assert_equal 'chewie', HighLine::Style.code_index['chewie'].last.code
388
-
389
- # Add another Style with a new name and code
390
- assert_nil HighLine::Style.code_index['c3po']
391
- HighLine::Style.new(:name=>:s9, :code=>'c3po')
392
- assert_equal list_size+2, HighLine::Style.code_index.size
393
- assert_instance_of Array, HighLine::Style.code_index['c3po']
394
- assert_equal 1, HighLine::Style.code_index['c3po'].size
395
- assert_equal :s9, HighLine::Style.code_index['c3po'].last.name
396
- assert_equal 'c3po', HighLine::Style.code_index['c3po'].last.code
397
-
398
- # Add a Style with an existing code
399
- assert_equal 1, HighLine::Style.code_index['c3po'].size
400
- HighLine::Style.new(:name=>:s10, :code=>'c3po')
401
- assert_equal list_size+2, HighLine::Style.code_index.size
402
- assert_equal 2, HighLine::Style.code_index['c3po'].size
403
- assert_equal :s10, HighLine::Style.code_index['c3po'].last.name
404
- assert_equal 'c3po', HighLine::Style.code_index['c3po'].last.code
405
- end
406
-
407
- def test_uncolor
408
- # Normal color
409
- assert_equal "This should be reverse underlined magenta!\n",
410
- HighLine::Style.uncolor("This should be \e[7m\e[4m\e[35mreverse underlined magenta\e[0m!\n" )
411
-
412
- # RGB color
413
- assert_equal "This should be rgb_906030!\n",
414
- HighLine::Style.uncolor("This should be \e[38;5;137mrgb_906030\e[0m!\n" )
415
- end
416
-
417
- def test_color
418
- assert_equal "\e[99mstring\e[0m", @style1.color("string") # simple style
419
- assert_equal "\e[99m\e[98mstring\e[0m", @style3.color("string") # Style list
420
- end
421
-
422
- def test_code
423
- assert_equal "\e[99m", @style1.code # simple style
424
- assert_equal "\e[99m\e[98m", @style3.code # Style list
425
- end
426
-
427
- def test_red
428
- assert_equal 0x65, @style4.red
429
- assert_equal 0, HighLine::Style(:none).red # Probably reliable
430
- assert_equal 0, HighLine::Style(:black).red # Probably reliable
431
- assert_equal 255, HighLine::Style(:bright_magenta).red # Seems to be reliable
432
- assert_equal 255, HighLine::Style(:on_none).red # Probably reliable
433
- end
434
-
435
- def test_green
436
- assert_equal 0x43, @style4.green
437
- assert_equal 0, HighLine::Style(:none).green # Probably reliable
438
- assert_equal 0, HighLine::Style(:black).green # Probably reliable
439
- assert 240 <= HighLine::Style(:bright_cyan).green # Probably reliable
440
- assert_equal 255, HighLine::Style(:on_none).green # Probably reliable
441
- end
442
-
443
- def test_blue
444
- assert_equal 0x21, @style4.blue
445
- assert_equal 0, HighLine::Style(:none).blue # Probably reliable
446
- assert_equal 0, HighLine::Style(:black).blue # Probably reliable
447
- assert_equal 255, HighLine::Style(:bright_blue).blue # Probably reliable
448
- assert_equal 255, HighLine::Style(:on_none).blue # Probably reliable
449
- end
450
-
451
- def test_builtin
452
- assert HighLine::Style(:red).builtin
453
- assert !@style1.builtin
454
- end
455
-
456
- def test_variant
457
- style1_name = @style1.name
458
- style1_code = @style1.code
459
- style1_rgb = @style1.rgb
460
-
461
- s1 = @style1.variant(:new_foo1, :code=>'abracadabra')
462
- assert_instance_of HighLine::Style, s1
463
- assert_not_same @style1, s1 # This is a copy
464
- assert_equal :new_foo1, s1.name # Changed
465
- assert_equal 'abracadabra', s1.code # Changed
466
- assert_equal [1,2,3], s1.rgb # Unchanged
467
-
468
- s2 = @style1.variant(:new_foo2, :increment=>-15)
469
- assert_instance_of HighLine::Style, s2
470
- assert_not_same @style1, s2 # This is a copy
471
- assert_equal :new_foo2, s2.name # Changed
472
- assert_equal "\e[84m", s2.code # 99 (original code) - 15
473
- assert_equal [1,2,3], s2.rgb # Unchanged
474
-
475
- s3 = @style1.variant(:new_foo3, :code=>"\e[55m", :increment=>15)
476
- assert_instance_of HighLine::Style, s3
477
- assert_not_same @style1, s3 # This is a copy
478
- assert_equal :new_foo3, s3.name # Changed
479
- assert_equal "\e[70m", s3.code # 99 (new code) + 15
480
- assert_equal [1,2,3], s3.rgb # Unchanged
481
-
482
- s4 = @style1.variant(:new_foo4, :code=>"\e[55m", :increment=>15, :rgb=>"blah")
483
- assert_instance_of HighLine::Style, s4
484
- assert_not_same @style1, s4 # This is a copy
485
- assert_equal :new_foo4, s4.name # Changed
486
- assert_equal "\e[70m", s4.code # 99 (new code) + 15
487
- assert_equal 'blah', s4.rgb # Changed
488
-
489
- s5 = @style1.variant(:new_foo5)
490
- assert_instance_of HighLine::Style, s5
491
- assert_not_same @style1, s5 # This is a copy
492
- assert_equal :new_foo5, s5.name # Changed
493
- assert_equal "\e[99m", s5.code # Unchanged
494
- assert_equal [1,2,3], s5.rgb # Unchanged
495
-
496
- # No @style1's have been harmed in the running of this test
497
- assert_equal style1_name, @style1.name
498
- assert_equal style1_code, @style1.code
499
- assert_equal style1_rgb, @style1.rgb
500
-
501
- assert_raise(::RuntimeError) { @style3.variant(:new_foo6) } # Can't create a variant of a list style
502
- end
503
-
504
- def test_on
505
- style1_name = @style1.name
506
- style1_code = @style1.code
507
- style1_rgb = @style1.rgb
508
-
509
- s1 = @style1.on
510
- assert_instance_of HighLine::Style, s1
511
- assert_not_same @style1, s1 # This is a copy
512
- assert_equal :on_foo, s1.name # Changed
513
- assert_equal "\e[109m", s1.code # Changed
514
- assert_equal [1,2,3], s1.rgb # Unchanged
515
-
516
- # No @style1's have been harmed in the running of this test
517
- assert_equal style1_name, @style1.name
518
- assert_equal style1_code, @style1.code
519
- assert_equal style1_rgb, @style1.rgb
520
-
521
- assert_raise(::RuntimeError) { @style3.on } # Can't create a variant of a list style
522
- end
523
-
524
- def test_bright
525
- style1_name = @style1.name
526
- style1_code = @style1.code
527
- style1_rgb = @style1.rgb
528
-
529
- s1 = @style1.bright
530
- assert_instance_of HighLine::Style, s1
531
- assert_not_same @style1, s1 # This is a copy
532
- assert_equal :bright_foo, s1.name # Changed
533
- assert_equal "\e[159m", s1.code # Changed
534
- assert_equal [129,130,131], s1.rgb # Changed
535
-
536
- # No @style1's have been harmed in the running of this test
537
- assert_equal style1_name, @style1.name
538
- assert_equal style1_code, @style1.code
539
- assert_equal style1_rgb, @style1.rgb
540
-
541
- s2_base = HighLine::Style.new(:name=>:leia, :code=>"\e[92m", :rgb=>[0,0,14])
542
- s2 = s2_base.bright
543
- assert_instance_of HighLine::Style, s2
544
- assert_not_same s2_base, s2 # This is a copy
545
- assert_equal :bright_leia, s2.name # Changed
546
- assert_equal "\e[152m", s2.code # Changed
547
- assert_equal [0,0,142], s2.rgb # Changed
548
-
549
- s3_base = HighLine::Style.new(:name=>:luke, :code=>"\e[93m", :rgb=>[20,21,0])
550
- s3 = s3_base.bright
551
- assert_instance_of HighLine::Style, s3
552
- assert_not_same s3_base, s3 # This is a copy
553
- assert_equal :bright_luke, s3.name # Changed
554
- assert_equal "\e[153m", s3.code # Changed
555
- assert_equal [148,149,0], s3.rgb # Changed
556
-
557
- s4_base = HighLine::Style.new(:name=>:r2d2, :code=>"\e[94m", :rgb=>[0,0,0])
558
- s4 = s4_base.bright
559
- assert_instance_of HighLine::Style, s4
560
- assert_not_same s4_base, s4 # This is a copy
561
- assert_equal :bright_r2d2, s4.name # Changed
562
- assert_equal "\e[154m", s4.code # Changed
563
- assert_equal [128,128,128], s4.rgb # Changed; special case
564
-
565
- assert_raise(::RuntimeError) { @style3.bright } # Can't create a variant of a list style
566
- end
567
-
568
- def test_light_do_the_same_as_bright
569
- bright_style = @style1.bright
570
- light_style = @style1.light
571
-
572
- assert_not_equal bright_style, light_style
573
- assert_equal :bright_foo, bright_style.name
574
- assert_equal :light_foo, light_style.name
575
- assert_equal bright_style.code, light_style.code
576
- assert_equal bright_style.rgb, light_style.rgb
577
- end
578
- end