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.
- checksums.yaml +4 -4
- data/CHANGES +4 -0
- data/Gemfile.lock +5 -5
- data/Rakefile +45 -19
- data/appveyor.yml +12 -0
- data/appveyor/build.cmd +3 -0
- data/lib/win32/api.rb +8 -0
- data/lib/win32/ruby21_32/win32/api.so +0 -0
- data/lib/win32/ruby21_64/win32/api.so +0 -0
- data/lib/win32/ruby22_32/win32/api.so +0 -0
- data/lib/win32/ruby22_64/win32/api.so +0 -0
- data/lib/win32/ruby23_32/win32/api.so +0 -0
- data/lib/win32/ruby23_64/win32/api.so +0 -0
- data/lib/win32/ruby24_32/win32/api.so +0 -0
- data/lib/win32/ruby24_64/win32/api.so +0 -0
- data/lib/win32/ruby2_32/win32/api.so +0 -0
- data/lib/win32/ruby2_64/win32/api.so +0 -0
- data/win32-api.gemspec +1 -1
- metadata +8 -341
- data/vendor/bundle/ruby/2.2.0/bin/devkit +0 -23
- data/vendor/bundle/ruby/2.2.0/bin/devkit.bat +0 -6
- data/vendor/bundle/ruby/2.2.0/bin/rake +0 -23
- data/vendor/bundle/ruby/2.2.0/bin/rake.bat +0 -6
- data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/CHANGELOG +0 -55
- data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/LICENSE +0 -339
- data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/README.md +0 -73
- data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/Rakefile +0 -8
- data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/colorize.gemspec +0 -35
- data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/lib/colorize.rb +0 -12
- data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/lib/colorize/class_methods.rb +0 -116
- data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/lib/colorize/instance_methods.rb +0 -135
- data/vendor/bundle/ruby/2.2.0/gems/colorize-0.7.7/test/test_colorize.rb +0 -161
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/Gemfile +0 -4
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/LICENSE.txt +0 -22
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/README.md +0 -34
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/Rakefile +0 -1
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/Rspec-example-matchers.txt +0 -184
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/bin/devkit +0 -87
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/devkit.gemspec +0 -27
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/lib/devkit.rb +0 -18
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/lib/devkit/core.rb +0 -53
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/lib/devkit/identity.rb +0 -78
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/lib/devkit/ssh_identity.rb +0 -53
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/lib/devkit/version.rb +0 -3
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/spec/devkit/core_spec.rb +0 -46
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/spec/devkit/identity_spec.rb +0 -1
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/spec/devkit/ssh_identity_spec.rb +0 -1
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/spec/devkit_spec.rb +0 -5
- data/vendor/bundle/ruby/2.2.0/gems/devkit-0.1.0/spec/spec_helper.rb +0 -8
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/AUTHORS +0 -3
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/COPYING +0 -339
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/Changelog.md +0 -415
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/Gemfile +0 -9
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/INSTALL +0 -59
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/LICENSE +0 -7
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/README.rdoc +0 -74
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/Rakefile +0 -30
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/TODO +0 -6
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/ansi_colors.rb +0 -38
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/asking_for_arrays.rb +0 -18
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/basic_usage.rb +0 -75
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/color_scheme.rb +0 -32
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/get_character.rb +0 -12
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/limit.rb +0 -12
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/menus.rb +0 -65
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/overwrite.rb +0 -19
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/page_and_wrap.rb +0 -322
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/password.rb +0 -7
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/repeat_entry.rb +0 -21
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/trapping_eof.rb +0 -22
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/examples/using_readline.rb +0 -17
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/highline.gemspec +0 -37
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline.rb +0 -1048
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/color_scheme.rb +0 -134
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/compatibility.rb +0 -16
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/import.rb +0 -41
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/menu.rb +0 -381
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/question.rb +0 -480
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/simulate.rb +0 -48
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/style.rb +0 -192
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/lib/highline/version.rb +0 -4
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/setup.rb +0 -1360
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/site/highline.css +0 -65
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/site/images/logo.png +0 -0
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/site/index.html +0 -58
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/string_methods.rb +0 -32
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_color_scheme.rb +0 -96
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_highline.rb +0 -1402
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_import.rb +0 -52
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_menu.rb +0 -439
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_simulator.rb +0 -23
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_string_highline.rb +0 -38
- data/vendor/bundle/ruby/2.2.0/gems/highline-1.7.8/test/tc_style.rb +0 -578
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/BSDL +0 -22
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/COPYING +0 -57
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/Gemfile +0 -9
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/LEGAL +0 -4
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/README.rdoc +0 -19
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/Rakefile +0 -16
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/benchmarks/bm_yhpg.rb +0 -59
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/benchmarks/helper.rb +0 -8
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/lib/power_assert.rb +0 -338
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/lib/power_assert/enable_tracepoint_events.rb +0 -82
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/lib/power_assert/version.rb +0 -3
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/power_assert.gemspec +0 -23
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/test/helper.rb +0 -10
- data/vendor/bundle/ruby/2.2.0/gems/power_assert-0.3.0/test/test_power_assert.rb +0 -512
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/CONTRIBUTING.rdoc +0 -38
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/History.rdoc +0 -719
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/MIT-LICENSE +0 -21
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/Manifest.txt +0 -154
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/README.rdoc +0 -157
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/Rakefile +0 -82
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/bin/rake +0 -33
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/command_line_usage.rdoc +0 -158
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/example/Rakefile1 +0 -38
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/example/Rakefile2 +0 -35
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/example/a.c +0 -6
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/example/b.c +0 -6
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/example/main.c +0 -11
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/glossary.rdoc +0 -42
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/jamis.rb +0 -591
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/proto_rake.rdoc +0 -127
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/rake.1 +0 -141
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/rakefile.rdoc +0 -624
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/rational.rdoc +0 -151
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.4.14.rdoc +0 -23
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.4.15.rdoc +0 -35
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.5.0.rdoc +0 -53
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.5.3.rdoc +0 -78
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.5.4.rdoc +0 -46
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.6.0.rdoc +0 -141
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.7.0.rdoc +0 -119
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.7.1.rdoc +0 -59
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.7.2.rdoc +0 -121
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.7.3.rdoc +0 -47
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.0.rdoc +0 -114
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.2.rdoc +0 -165
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.3.rdoc +0 -112
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.4.rdoc +0 -147
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.5.rdoc +0 -53
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.6.rdoc +0 -37
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.8.7.rdoc +0 -55
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.0.rdoc +0 -112
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.1.rdoc +0 -52
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.2.2.rdoc +0 -55
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.2.rdoc +0 -49
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.3.rdoc +0 -102
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.4.rdoc +0 -60
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.5.rdoc +0 -55
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-0.9.6.rdoc +0 -64
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-10.0.0.rdoc +0 -178
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-10.0.1.rdoc +0 -58
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-10.0.2.rdoc +0 -53
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-10.0.3.rdoc +0 -191
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/doc/release_notes/rake-10.1.0.rdoc +0 -61
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake.rb +0 -73
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/application.rb +0 -787
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/backtrace.rb +0 -23
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/clean.rb +0 -76
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/cloneable.rb +0 -16
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/contrib/compositepublisher.rb +0 -21
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/contrib/ftptools.rb +0 -137
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/contrib/sshpublisher.rb +0 -60
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/cpu_counter.rb +0 -120
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/default_loader.rb +0 -14
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/dsl_definition.rb +0 -194
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/early_time.rb +0 -21
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/file_creation_task.rb +0 -24
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/file_list.rb +0 -436
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/file_task.rb +0 -46
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/file_utils.rb +0 -123
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/invocation_chain.rb +0 -56
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/invocation_exception_mixin.rb +0 -16
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/late_time.rb +0 -17
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/linked_list.rb +0 -111
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/loaders/makefile.rb +0 -53
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/multi_task.rb +0 -13
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/name_space.rb +0 -38
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/packagetask.rb +0 -199
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/phony.rb +0 -15
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/private_reader.rb +0 -20
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/promise.rb +0 -99
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/pseudo_status.rb +0 -29
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/rake_module.rb +0 -38
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/rake_test_loader.rb +0 -22
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/rule_recursion_overflow_error.rb +0 -20
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/scope.rb +0 -42
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/task.rb +0 -391
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/task_argument_error.rb +0 -7
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/task_arguments.rb +0 -102
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/task_manager.rb +0 -316
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/tasklib.rb +0 -11
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/testtask.rb +0 -204
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/thread_history_display.rb +0 -48
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/thread_pool.rb +0 -163
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/trace_output.rb +0 -22
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/version.rb +0 -7
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/lib/rake/win32.rb +0 -50
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/rakelib/test_times.rake +0 -25
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/file_creation.rb +0 -34
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/helper.rb +0 -134
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/support/rakefile_definitions.rb +0 -476
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/support/ruby_runner.rb +0 -34
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_private_reader.rb +0 -42
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake.rb +0 -40
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_application.rb +0 -659
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_application_options.rb +0 -468
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_backtrace.rb +0 -119
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_clean.rb +0 -61
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_cpu_counter.rb +0 -68
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_definitions.rb +0 -84
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_directory_task.rb +0 -76
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_dsl.rb +0 -40
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_early_time.rb +0 -31
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_creation_task.rb +0 -56
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_list.rb +0 -687
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_list_path_map.rb +0 -15
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_task.rb +0 -197
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_utils.rb +0 -318
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_ftp_file.rb +0 -74
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_functional.rb +0 -484
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_invocation_chain.rb +0 -64
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_late_time.rb +0 -18
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_linked_list.rb +0 -84
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_makefile_loader.rb +0 -46
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_multi_task.rb +0 -64
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_name_space.rb +0 -57
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_package_task.rb +0 -79
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_path_map.rb +0 -168
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_path_map_explode.rb +0 -34
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_path_map_partial.rb +0 -18
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_pseudo_status.rb +0 -21
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_rake_test_loader.rb +0 -20
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_reduce_compat.rb +0 -26
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_require.rb +0 -40
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_rules.rb +0 -388
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_scope.rb +0 -44
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task.rb +0 -430
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task_argument_parsing.rb +0 -119
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task_arguments.rb +0 -134
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task_manager.rb +0 -178
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task_manager_argument_resolution.rb +0 -19
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_task_with_arguments.rb +0 -172
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_test_task.rb +0 -130
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_thread_pool.rb +0 -145
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_top_level_functions.rb +0 -71
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_win32.rb +0 -72
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_thread_history_display.rb +0 -101
- data/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_trace_output.rb +0 -52
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/COPYING +0 -64
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/GPL +0 -339
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/LGPL +0 -502
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/PSFL +0 -271
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/README.md +0 -101
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/Rakefile +0 -71
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test-unit.rb +0 -34
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit.rb +0 -505
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/assertion-failed-error.rb +0 -25
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/assertions.rb +0 -2218
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/attribute-matcher.rb +0 -26
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/attribute.rb +0 -158
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/auto-runner-loader.rb +0 -17
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/autorunner.rb +0 -536
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/code-snippet-fetcher.rb +0 -58
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector.rb +0 -73
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector/descendant.rb +0 -19
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector/dir.rb +0 -108
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector/load.rb +0 -202
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector/objectspace.rb +0 -34
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/collector/xml.rb +0 -249
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/color-scheme.rb +0 -198
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/color.rb +0 -134
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/data.rb +0 -262
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/diff.rb +0 -746
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/error.rb +0 -158
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/exception-handler.rb +0 -82
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/failure.rb +0 -169
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/fault-location-detector.rb +0 -100
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/fixture.rb +0 -295
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/notification.rb +0 -136
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/omission.rb +0 -195
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/pending.rb +0 -154
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/priority.rb +0 -192
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/runner/console.rb +0 -59
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/runner/emacs.rb +0 -8
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/runner/xml.rb +0 -15
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/test-suite-creator.rb +0 -89
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/testcase.rb +0 -811
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/testresult.rb +0 -132
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/testsuite.rb +0 -175
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/console/outputlevel.rb +0 -15
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/console/testrunner.rb +0 -693
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/emacs/testrunner.rb +0 -49
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/testrunner.rb +0 -53
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/testrunnermediator.rb +0 -114
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/testrunnerutilities.rb +0 -41
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/ui/xml/testrunner.rb +0 -224
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/util/backtracefilter.rb +0 -59
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/util/method-owner-finder.rb +0 -28
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/util/observable.rb +0 -90
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/util/output.rb +0 -31
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/util/procwrapper.rb +0 -48
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/lib/test/unit/version.rb +0 -5
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/sample/adder.rb +0 -13
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/sample/subtracter.rb +0 -12
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/sample/test_adder.rb +0 -20
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/sample/test_subtracter.rb +0 -20
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/sample/test_user.rb +0 -23
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/collector/test-descendant.rb +0 -178
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/collector/test-load.rb +0 -442
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/collector/test_dir.rb +0 -406
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/collector/test_objectspace.rb +0 -100
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/header-label.csv +0 -3
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/header-label.tsv +0 -3
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/header.csv +0 -3
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/header.tsv +0 -3
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/no-header.csv +0 -2
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/no-header.tsv +0 -2
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/fixtures/plus.csv +0 -3
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/run-test.rb +0 -22
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-assertions.rb +0 -2160
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-attribute-matcher.rb +0 -38
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-attribute.rb +0 -123
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-code-snippet.rb +0 -37
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-color-scheme.rb +0 -82
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-color.rb +0 -47
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-data.rb +0 -303
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-diff.rb +0 -518
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-emacs-runner.rb +0 -60
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-error.rb +0 -26
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-failure.rb +0 -33
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-fault-location-detector.rb +0 -163
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-fixture.rb +0 -713
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-notification.rb +0 -33
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-omission.rb +0 -81
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-pending.rb +0 -70
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-priority.rb +0 -173
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-test-case.rb +0 -1171
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-test-result.rb +0 -113
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-test-suite-creator.rb +0 -97
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/test-test-suite.rb +0 -150
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/testunit-test-util.rb +0 -31
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/ui/test_testrunmediator.rb +0 -20
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/util/test-method-owner-finder.rb +0 -38
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/util/test-output.rb +0 -11
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/util/test_backtracefilter.rb +0 -52
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/util/test_observable.rb +0 -102
- data/vendor/bundle/ruby/2.2.0/gems/test-unit-3.1.9/test/util/test_procwrapper.rb +0 -36
- data/vendor/bundle/ruby/2.2.0/specifications/colorize-0.7.7.gemspec +0 -38
- data/vendor/bundle/ruby/2.2.0/specifications/devkit-0.1.0.gemspec +0 -46
- data/vendor/bundle/ruby/2.2.0/specifications/highline-1.7.8.gemspec +0 -37
- data/vendor/bundle/ruby/2.2.0/specifications/power_assert-0.3.0.gemspec +0 -41
- data/vendor/bundle/ruby/2.2.0/specifications/rake-11.1.2.gemspec +0 -43
- 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
|