opal 1.0.3 → 1.1.1.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +13 -12
- data/.gitattributes +1 -1
- data/.github/FUNDING.yml +1 -0
- data/.github/workflows/build.yml +90 -0
- data/.jshintrc +1 -1
- data/.overcommit.yml +35 -0
- data/.rubocop.yml +44 -7
- data/{.rubocop_todo.yml → .rubocop/todo.yml} +4 -5
- data/CHANGELOG.md +152 -1
- data/Gemfile +2 -3
- data/HACKING.md +2 -9
- data/LICENSE +1 -1
- data/README.md +21 -18
- data/UNRELEASED.md +4 -2
- data/benchmark-ips/bm_array_pop_1.rb +8 -0
- data/benchmark-ips/bm_array_shift.rb +7 -0
- data/benchmark-ips/bm_js_symbols_vs_strings.rb +7 -2
- data/benchmark-ips/class_shovel_vs_singleton_class.rb +16 -0
- data/bin/build-browser-source-map-support +4 -0
- data/bin/format-filters +54 -0
- data/bin/git-submodule-fast-install +49 -0
- data/bin/remove-filters +39 -0
- data/bin/setup +4 -0
- data/bin/yarn +11 -0
- data/docs/releasing.md +18 -0
- data/docs/roda-sprockets.md +86 -0
- data/docs/sinatra.md +5 -12
- data/examples/rack/Gemfile +1 -0
- data/examples/rack/app/application.rb +3 -0
- data/examples/rack/config.ru +5 -4
- data/exe/opal-repl +2 -83
- data/lib/opal/ast/builder.rb +1 -1
- data/lib/opal/builder.rb +2 -10
- data/lib/opal/builder_processors.rb +1 -1
- data/lib/opal/cli.rb +4 -1
- data/lib/opal/cli_options.rb +11 -3
- data/lib/opal/cli_runners.rb +27 -37
- data/lib/opal/cli_runners/applescript.rb +5 -44
- data/lib/opal/cli_runners/chrome.js +7 -35
- data/lib/opal/cli_runners/chrome.rb +75 -17
- data/lib/opal/cli_runners/compiler.rb +17 -0
- data/lib/opal/cli_runners/nashorn.rb +9 -43
- data/lib/opal/cli_runners/nodejs.rb +18 -47
- data/lib/opal/cli_runners/server.rb +18 -6
- data/lib/opal/cli_runners/source-map-support-browser.js +6449 -0
- data/lib/opal/cli_runners/source-map-support-node.js +3704 -0
- data/lib/opal/cli_runners/source-map-support.js +639 -0
- data/lib/opal/cli_runners/system_runner.rb +45 -0
- data/lib/opal/compiler.rb +57 -29
- data/lib/opal/config.rb +0 -5
- data/lib/opal/erb.rb +1 -1
- data/lib/opal/magic_comments.rb +34 -0
- data/lib/opal/nodes/args/arity_check.rb +2 -1
- data/lib/opal/nodes/base.rb +1 -1
- data/lib/opal/nodes/call.rb +1 -4
- data/lib/opal/nodes/def.rb +2 -0
- data/lib/opal/nodes/iter.rb +1 -1
- data/lib/opal/nodes/literal.rb +19 -14
- data/lib/opal/nodes/logic.rb +5 -80
- data/lib/opal/nodes/masgn.rb +2 -0
- data/lib/opal/nodes/rescue.rb +1 -1
- data/lib/opal/nodes/super.rb +24 -10
- data/lib/opal/nodes/top.rb +5 -4
- data/lib/opal/parser/with_c_lexer.rb +2 -1
- data/lib/opal/parser/with_ruby_lexer.rb +1 -1
- data/lib/opal/path_reader.rb +2 -2
- data/lib/opal/paths.rb +8 -5
- data/lib/opal/repl.rb +103 -0
- data/lib/opal/rewriter.rb +4 -0
- data/lib/opal/rewriters/for_rewriter.rb +1 -1
- data/lib/opal/rewriters/js_reserved_words.rb +7 -7
- data/lib/opal/rewriters/numblocks.rb +31 -0
- data/lib/opal/rewriters/returnable_logic.rb +33 -0
- data/lib/opal/util.rb +11 -48
- data/lib/opal/version.rb +1 -1
- data/opal.gemspec +26 -26
- data/opal/corelib/array.rb +160 -118
- data/opal/corelib/array/pack.rb +5 -3
- data/opal/corelib/basic_object.rb +4 -4
- data/opal/corelib/class.rb +2 -1
- data/opal/corelib/comparable.rb +49 -31
- data/opal/corelib/constants.rb +5 -5
- data/opal/corelib/enumerable.rb +108 -46
- data/opal/corelib/enumerator.rb +27 -12
- data/opal/corelib/file.rb +3 -1
- data/opal/corelib/hash.rb +6 -1
- data/opal/corelib/helpers.rb +8 -28
- data/opal/corelib/io.rb +12 -7
- data/opal/corelib/kernel.rb +45 -14
- data/opal/corelib/kernel/format.rb +3 -1
- data/opal/corelib/math.rb +8 -6
- data/opal/corelib/method.rb +8 -0
- data/opal/corelib/module.rb +17 -2
- data/opal/corelib/number.rb +3 -12
- data/opal/corelib/proc.rb +16 -0
- data/opal/corelib/random/mersenne_twister.rb +147 -0
- data/opal/corelib/range.rb +3 -13
- data/opal/corelib/regexp.rb +10 -6
- data/opal/corelib/runtime.js +208 -81
- data/opal/corelib/string.rb +55 -49
- data/opal/corelib/string/encoding.rb +109 -32
- data/opal/corelib/string/unpack.rb +2 -17
- data/opal/corelib/struct.rb +14 -1
- data/opal/corelib/time.rb +4 -0
- data/opal/opal.rb +1 -1
- data/opal/opal/mini.rb +1 -1
- data/package.json +16 -0
- data/spec/README.md +10 -0
- data/spec/filters/bugs/array.rb +76 -0
- data/spec/filters/bugs/base64.rb +10 -0
- data/spec/filters/bugs/basicobject.rb +12 -0
- data/spec/filters/bugs/bigdecimal.rb +248 -0
- data/spec/filters/bugs/class.rb +12 -0
- data/spec/filters/bugs/complex.rb +7 -0
- data/spec/filters/bugs/date.rb +104 -0
- data/spec/filters/bugs/encoding.rb +259 -0
- data/spec/filters/bugs/enumerable.rb +26 -0
- data/spec/filters/bugs/enumerator.rb +48 -0
- data/spec/filters/bugs/exception.rb +120 -0
- data/spec/filters/bugs/file.rb +48 -0
- data/spec/filters/bugs/float.rb +74 -0
- data/spec/filters/bugs/hash.rb +60 -0
- data/spec/filters/bugs/integer.rb +78 -0
- data/spec/filters/bugs/io.rb +9 -0
- data/spec/filters/bugs/kernel.rb +401 -0
- data/spec/filters/bugs/language.rb +451 -0
- data/spec/filters/bugs/marshal.rb +50 -0
- data/spec/filters/bugs/math.rb +4 -0
- data/spec/filters/bugs/method.rb +79 -0
- data/spec/filters/bugs/module.rb +281 -0
- data/spec/filters/bugs/nilclass.rb +4 -0
- data/spec/filters/bugs/numeric.rb +27 -0
- data/spec/filters/bugs/openstruct.rb +8 -0
- data/spec/filters/bugs/pack_unpack.rb +138 -0
- data/spec/filters/bugs/pathname.rb +9 -0
- data/spec/filters/bugs/proc.rb +80 -0
- data/spec/filters/bugs/random.rb +20 -0
- data/spec/filters/bugs/range.rb +139 -0
- data/spec/filters/bugs/rational.rb +12 -0
- data/spec/filters/bugs/regexp.rb +91 -0
- data/spec/filters/bugs/set.rb +51 -0
- data/spec/filters/bugs/singleton.rb +7 -0
- data/spec/filters/bugs/string.rb +341 -0
- data/spec/filters/bugs/stringscanner.rb +78 -0
- data/spec/filters/bugs/struct.rb +26 -0
- data/spec/filters/bugs/symbol.rb +7 -0
- data/spec/filters/bugs/time.rb +109 -0
- data/spec/filters/bugs/unboundmethod.rb +33 -0
- data/spec/filters/bugs/warnings.rb +30 -0
- data/spec/filters/unsupported/array.rb +168 -0
- data/spec/filters/unsupported/basicobject.rb +15 -0
- data/spec/filters/unsupported/bignum.rb +55 -0
- data/spec/filters/unsupported/class.rb +5 -0
- data/spec/filters/unsupported/delegator.rb +6 -0
- data/spec/filters/unsupported/enumerable.rb +12 -0
- data/spec/filters/unsupported/enumerator.rb +14 -0
- data/spec/filters/unsupported/file.rb +4 -0
- data/spec/filters/unsupported/fixnum.rb +15 -0
- data/spec/filters/unsupported/float.rb +47 -0
- data/spec/filters/unsupported/freeze.rb +259 -0
- data/spec/filters/unsupported/hash.rb +44 -0
- data/spec/filters/unsupported/integer.rb +101 -0
- data/spec/filters/unsupported/kernel.rb +35 -0
- data/spec/filters/unsupported/language.rb +25 -0
- data/spec/filters/unsupported/marshal.rb +44 -0
- data/spec/filters/unsupported/matchdata.rb +63 -0
- data/spec/filters/unsupported/math.rb +4 -0
- data/spec/filters/unsupported/pathname.rb +4 -0
- data/spec/filters/unsupported/privacy.rb +287 -0
- data/spec/filters/unsupported/proc.rb +4 -0
- data/spec/filters/unsupported/random.rb +5 -0
- data/spec/filters/unsupported/range.rb +8 -0
- data/spec/filters/unsupported/regexp.rb +70 -0
- data/spec/filters/unsupported/set.rb +5 -0
- data/spec/filters/unsupported/singleton.rb +7 -0
- data/spec/filters/unsupported/string.rb +687 -0
- data/spec/filters/unsupported/struct.rb +7 -0
- data/spec/filters/unsupported/symbol.rb +21 -0
- data/spec/filters/unsupported/taint.rb +162 -0
- data/spec/filters/unsupported/thread.rb +10 -0
- data/spec/filters/unsupported/time.rb +204 -0
- data/spec/filters/unsupported/usage_of_files.rb +262 -0
- data/spec/lib/builder_processors_spec.rb +44 -0
- data/spec/lib/builder_spec.rb +133 -0
- data/spec/lib/cli_runners/server_spec.rb +25 -0
- data/spec/lib/cli_runners_spec.rb +16 -0
- data/spec/lib/cli_spec.rb +256 -0
- data/spec/lib/compiler_spec.rb +693 -0
- data/spec/lib/config_spec.rb +112 -0
- data/spec/lib/dependency_resolver_spec.rb +43 -0
- data/spec/lib/deprecations_spec.rb +17 -0
- data/spec/lib/fixtures/complex_sprockets.js.rb.erb +4 -0
- data/spec/lib/fixtures/file_with_directives.js +2 -0
- data/spec/lib/fixtures/jst_file.js.jst +1 -0
- data/spec/lib/fixtures/no_requires.rb +1 -0
- data/spec/lib/fixtures/opal_file.rb +2 -0
- data/spec/lib/fixtures/require_tree_test.rb +3 -0
- data/spec/lib/fixtures/required_file.js +1 -0
- data/spec/lib/fixtures/required_tree_test/required_file1.rb +1 -0
- data/spec/lib/fixtures/required_tree_test/required_file2.rb +1 -0
- data/spec/lib/fixtures/requires.rb +7 -0
- data/spec/lib/fixtures/source_location_test.rb +7 -0
- data/spec/lib/fixtures/source_map.rb +1 -0
- data/spec/lib/fixtures/source_map/subfolder/other_file.rb +1 -0
- data/spec/lib/fixtures/sprockets_file.js.rb +3 -0
- data/spec/lib/fixtures/sprockets_require_tree_test.rb +3 -0
- data/spec/lib/path_reader_spec.rb +47 -0
- data/spec/lib/paths_spec.rb +18 -0
- data/spec/lib/repl_spec.rb +28 -0
- data/spec/lib/rewriters/base_spec.rb +68 -0
- data/spec/lib/rewriters/binary_operator_assignment_spec.rb +153 -0
- data/spec/lib/rewriters/block_to_iter_spec.rb +28 -0
- data/spec/lib/rewriters/dot_js_syntax_spec.rb +108 -0
- data/spec/lib/rewriters/explicit_writer_return_spec.rb +186 -0
- data/spec/lib/rewriters/for_rewriter_spec.rb +92 -0
- data/spec/lib/rewriters/hashes/key_duplicates_rewriter_spec.rb +47 -0
- data/spec/lib/rewriters/js_reserved_words_spec.rb +119 -0
- data/spec/lib/rewriters/logical_operator_assignment_spec.rb +202 -0
- data/spec/lib/rewriters/opal_engine_check_spec.rb +84 -0
- data/spec/lib/rewriters/returnable_logic_spec.rb +52 -0
- data/spec/lib/rewriters/rubyspec/filters_rewriter_spec.rb +59 -0
- data/spec/lib/simple_server_spec.rb +56 -0
- data/spec/lib/source_map/file_spec.rb +67 -0
- data/spec/lib/source_map/index_spec.rb +80 -0
- data/spec/lib/spec_helper.rb +105 -0
- data/spec/mspec-opal/formatters.rb +197 -0
- data/spec/mspec-opal/runner.rb +172 -0
- data/spec/opal/compiler/irb_spec.rb +44 -0
- data/spec/opal/compiler/unicode_spec.rb +10 -0
- data/spec/opal/core/array/dup_spec.rb +23 -0
- data/spec/opal/core/array/intersection_spec.rb +38 -0
- data/spec/opal/core/array/minus_spec.rb +38 -0
- data/spec/opal/core/array/union_spec.rb +38 -0
- data/spec/opal/core/array/uniq_spec.rb +49 -0
- data/spec/opal/core/class/inherited_spec.rb +18 -0
- data/spec/opal/core/enumerable/all_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/any_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/collect_break_spec.rb +13 -0
- data/spec/opal/core/enumerable/count_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/detect_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/drop_while_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/each_slice_break_spec.rb +6 -0
- data/spec/opal/core/enumerable/each_with_index_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/each_with_object_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/find_all_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/find_index_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/grep_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/max_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/max_by_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/min_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/min_by_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/none_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/one_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/reduce_break_spec.rb +5 -0
- data/spec/opal/core/enumerable/take_while_break_spec.rb +5 -0
- data/spec/opal/core/enumerator/with_index_spec.rb +6 -0
- data/spec/opal/core/exception_spec.rb +8 -0
- data/spec/opal/core/fixtures/require_tree_files/file 1.rb +1 -0
- data/spec/opal/core/fixtures/require_tree_files/file 2.rb +1 -0
- data/spec/opal/core/fixtures/require_tree_files/file 3.rb +1 -0
- data/spec/opal/core/fixtures/require_tree_files/file 4.rb +1 -0
- data/spec/opal/core/fixtures/require_tree_files/file 5.rb +1 -0
- data/spec/opal/core/fixtures/require_tree_files/nested/nested 1.rb +1 -0
- data/spec/opal/core/fixtures/require_tree_files/nested/nested 2.rb +1 -0
- data/spec/opal/core/fixtures/require_tree_files/other/other 1.rb +1 -0
- data/spec/opal/core/fixtures/require_tree_with_dot/file 1.rb +1 -0
- data/spec/opal/core/fixtures/require_tree_with_dot/file 2.rb +1 -0
- data/spec/opal/core/fixtures/require_tree_with_dot/file 3.rb +1 -0
- data/spec/opal/core/fixtures/require_tree_with_dot/index.rb +3 -0
- data/spec/opal/core/hash/internals_spec.rb +339 -0
- data/spec/opal/core/helpers_spec.rb +14 -0
- data/spec/opal/core/iterable_props_spec.rb +53 -0
- data/spec/opal/core/kernel/at_exit_spec.rb +70 -0
- data/spec/opal/core/kernel/freeze_spec.rb +15 -0
- data/spec/opal/core/kernel/instance_variables_spec.rb +110 -0
- data/spec/opal/core/kernel/methods_spec.rb +25 -0
- data/spec/opal/core/kernel/public_methods_spec.rb +25 -0
- data/spec/opal/core/kernel/require_tree_spec.rb +18 -0
- data/spec/opal/core/kernel/respond_to_spec.rb +15 -0
- data/spec/opal/core/language/DATA/characters_support_spec.rb +9 -0
- data/spec/opal/core/language/DATA/empty___END___spec.rb +7 -0
- data/spec/opal/core/language/DATA/multiple___END___spec.rb +10 -0
- data/spec/opal/core/language/arguments/mlhs_arg_spec.rb +18 -0
- data/spec/opal/core/language/keyword_arguments_spec.rb +9 -0
- data/spec/opal/core/language/numblocks_spec.rb +16 -0
- data/spec/opal/core/language/safe_navigator_spec.rb +7 -0
- data/spec/opal/core/language/while_spec.rb +31 -0
- data/spec/opal/core/language_spec.rb +29 -0
- data/spec/opal/core/marshal/dump_spec.rb +81 -0
- data/spec/opal/core/marshal/load_spec.rb +13 -0
- data/spec/opal/core/module_spec.rb +27 -0
- data/spec/opal/core/object_id_spec.rb +56 -0
- data/spec/opal/core/regexp/interpolation_spec.rb +40 -0
- data/spec/opal/core/regexp/match_spec.rb +78 -0
- data/spec/opal/core/runtime/bridged_classes_spec.rb +123 -0
- data/spec/opal/core/runtime/constants_spec.rb +16 -0
- data/spec/opal/core/runtime/eval_spec.rb +5 -0
- data/spec/opal/core/runtime/exit_spec.rb +29 -0
- data/spec/opal/core/runtime/is_a_spec.rb +48 -0
- data/spec/opal/core/runtime/loaded_spec.rb +20 -0
- data/spec/opal/core/runtime/main_methods_spec.rb +39 -0
- data/spec/opal/core/runtime/method_missing_spec.rb +68 -0
- data/spec/opal/core/runtime/rescue_spec.rb +37 -0
- data/spec/opal/core/runtime/string_spec.rb +25 -0
- data/spec/opal/core/runtime/truthy_spec.rb +61 -0
- data/spec/opal/core/runtime_spec.rb +58 -0
- data/spec/opal/core/string/each_byte_spec.rb +19 -0
- data/spec/opal/core/string/gsub_spec.rb +35 -0
- data/spec/opal/core/string/to_sym_spec.rb +9 -0
- data/spec/opal/core/string_spec.rb +28 -0
- data/spec/opal/core/struct/dup_spec.rb +11 -0
- data/spec/opal/core/time_spec.rb +68 -0
- data/spec/opal/stdlib/erb/erb_spec.rb +30 -0
- data/spec/opal/stdlib/erb/inline_block.opalerb +3 -0
- data/spec/opal/stdlib/erb/quoted.opalerb +1 -0
- data/spec/opal/stdlib/erb/simple.opalerb +1 -0
- data/spec/opal/stdlib/js_spec.rb +72 -0
- data/spec/opal/stdlib/json/ext_spec.rb +55 -0
- data/spec/opal/stdlib/json/parse_spec.rb +37 -0
- data/spec/opal/stdlib/logger/logger_spec.rb +308 -0
- data/spec/opal/stdlib/native/alias_native_spec.rb +27 -0
- data/spec/opal/stdlib/native/array_spec.rb +11 -0
- data/spec/opal/stdlib/native/date_spec.rb +12 -0
- data/spec/opal/stdlib/native/deprecated_include_spec.rb +8 -0
- data/spec/opal/stdlib/native/each_spec.rb +13 -0
- data/spec/opal/stdlib/native/element_reference_spec.rb +16 -0
- data/spec/opal/stdlib/native/exposure_spec.rb +33 -0
- data/spec/opal/stdlib/native/ext_spec.rb +19 -0
- data/spec/opal/stdlib/native/hash_spec.rb +67 -0
- data/spec/opal/stdlib/native/initialize_spec.rb +17 -0
- data/spec/opal/stdlib/native/method_missing_spec.rb +51 -0
- data/spec/opal/stdlib/native/native_alias_spec.rb +26 -0
- data/spec/opal/stdlib/native/native_class_spec.rb +18 -0
- data/spec/opal/stdlib/native/native_module_spec.rb +13 -0
- data/spec/opal/stdlib/native/native_reader_spec.rb +22 -0
- data/spec/opal/stdlib/native/native_writer_spec.rb +30 -0
- data/spec/opal/stdlib/native/new_spec.rb +92 -0
- data/spec/opal/stdlib/native/struct_spec.rb +12 -0
- data/spec/opal/stdlib/pp_spec.rb +5 -0
- data/spec/opal/stdlib/promise/always_spec.rb +49 -0
- data/spec/opal/stdlib/promise/error_spec.rb +15 -0
- data/spec/opal/stdlib/promise/rescue_spec.rb +53 -0
- data/spec/opal/stdlib/promise/then_spec.rb +79 -0
- data/spec/opal/stdlib/promise/trace_spec.rb +51 -0
- data/spec/opal/stdlib/promise/value_spec.rb +15 -0
- data/spec/opal/stdlib/promise/when_spec.rb +34 -0
- data/spec/opal/stdlib/source_map_spec.rb +8 -0
- data/spec/opal/stdlib/strscan/scan_spec.rb +11 -0
- data/spec/opal/stdlib/template/paths_spec.rb +10 -0
- data/spec/opal/stdlib/thread/mutex_spec.rb +40 -0
- data/spec/opal/stdlib/thread/thread_queue_spec.rb +32 -0
- data/spec/opal/stdlib/thread/thread_spec.rb +60 -0
- data/spec/ruby_specs +183 -0
- data/spec/spec_helper.rb +31 -0
- data/spec/support/guard_platform.rb +4 -0
- data/spec/support/match_helpers.rb +57 -0
- data/spec/support/mspec_rspec_adapter.rb +33 -0
- data/spec/support/rewriters_helper.rb +54 -0
- data/spec/support/source_map_helper.rb +190 -0
- data/stdlib/base64.rb +2 -2
- data/stdlib/bigdecimal.rb +15 -3
- data/stdlib/bigdecimal/bignumber.js.rb +1 -1
- data/stdlib/bigdecimal/util.rb +148 -0
- data/stdlib/delegate.rb +8 -0
- data/stdlib/nodejs/fileutils.rb +1 -1
- data/stdlib/nodejs/kernel.rb +0 -13
- data/stdlib/nodejs/stacktrace.rb +4 -179
- data/stdlib/ostruct.rb +5 -0
- data/stdlib/pp.rb +586 -19
- data/stdlib/prettyprint.rb +556 -0
- data/stdlib/rbconfig/sizeof.rb +2 -0
- data/stdlib/securerandom.rb +32 -0
- data/stdlib/set.rb +36 -0
- data/stdlib/strscan.rb +15 -0
- data/tasks/benchmarking.rake +1 -1
- data/tasks/linting.rake +3 -5
- data/tasks/releasing.rake +2 -5
- data/tasks/testing.rake +16 -11
- data/tasks/testing/mspec_special_calls.rb +1 -19
- data/test/nodejs/fixtures/cat.png +0 -0
- data/test/nodejs/fixtures/hello.rb +1 -0
- data/test/nodejs/fixtures/iso88591.txt +1 -0
- data/test/nodejs/fixtures/utf8.txt +1 -0
- data/test/nodejs/fixtures/win1258.txt +1 -0
- data/test/nodejs/test_dir.rb +39 -0
- data/test/nodejs/test_env.rb +62 -0
- data/test/nodejs/test_error.rb +29 -0
- data/test/nodejs/test_file.rb +206 -0
- data/test/nodejs/test_file_encoding.rb +20 -0
- data/test/nodejs/test_io.rb +18 -0
- data/test/nodejs/test_opal_builder.rb +12 -0
- data/test/nodejs/test_pathname.rb +16 -0
- data/test/opal/cat.png +0 -0
- data/test/opal/http_server.rb +52 -0
- data/test/opal/test_base64.rb +115 -0
- data/test/opal/test_keyword.rb +590 -0
- data/test/opal/test_matrix.rb +661 -0
- data/test/opal/test_openuri.rb +53 -0
- data/test/opal/unsupported_and_bugs.rb +39 -0
- data/yarn.lock +1355 -0
- metadata +905 -40
- data/.travis.yml +0 -109
- data/appveyor.yml +0 -35
- data/lib/opal/nodes/runtime_helpers.rb +0 -51
- data/opal/corelib/random/MersenneTwister.js +0 -137
- data/opal/corelib/random/mersenne_twister.js.rb +0 -13
- data/stdlib/bigdecimal/kernel.rb +0 -5
@@ -0,0 +1,9 @@
|
|
1
|
+
# NOTE: run bin/format-filters after changing this file
|
2
|
+
opal_filter "Pathname" do
|
3
|
+
fails "Pathname#/ appends a pathname to self" # NoMethodError: undefined method `/' for /usr
|
4
|
+
fails "Pathname#realdirpath returns a Pathname"
|
5
|
+
fails "Pathname#realpath returns a Pathname"
|
6
|
+
fails "Pathname#relative_path_from raises an error when the base directory has .."
|
7
|
+
fails "Pathname#relative_path_from raises an error when the two paths do not share a common prefix"
|
8
|
+
fails "Pathname#relative_path_from returns current and pattern when only those patterns are used"
|
9
|
+
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
# NOTE: run bin/format-filters after changing this file
|
2
|
+
opal_filter "Proc" do
|
3
|
+
fails "Proc as an implicit block pass argument remains the same object if re-vivified by the target method"
|
4
|
+
fails "Proc#<< composition is a lambda when parameter is lambda" # NoMethodError: undefined method `<<' for #<Proc:0x760e0>
|
5
|
+
fails "Proc#<< does not try to coerce argument with #to_proc" # Expected TypeError (callable object is expected) but got: NoMethodError (undefined method `<<' for #<Proc:0x760c8>)
|
6
|
+
fails "Proc#<< raises TypeError if passed not callable object" # Expected TypeError (callable object is expected) but got: NoMethodError (undefined method `<<' for #<Proc:0x760d8>)
|
7
|
+
fails "Proc#== is a public method" # Expected Proc to have public instance method '==' but it does not
|
8
|
+
fails "Proc#== returns true if other is a dup of the original" # Expected false to be true
|
9
|
+
fails "Proc#=== can call its block argument declared with a block argument" # Expected 6 to equal 10
|
10
|
+
fails "Proc#=== yields to the block given at declaration and not to the block argument" # Expected 3 to equal 7
|
11
|
+
fails "Proc#>> composition is a lambda when self is lambda" # NoMethodError: undefined method `>>' for #<Proc:0x76126>
|
12
|
+
fails "Proc#>> does not try to coerce argument with #to_proc" # Expected TypeError (callable object is expected) but got: NoMethodError (undefined method `>>' for #<Proc:0x76108>)
|
13
|
+
fails "Proc#>> raises TypeError if passed not callable object" # Expected TypeError (callable object is expected) but got: NoMethodError (undefined method `>>' for #<Proc:0x76116>)
|
14
|
+
fails "Proc#[] can call its block argument declared with a block argument" # Expected 6 to equal 10
|
15
|
+
fails "Proc#[] yields to the block given at declaration and not to the block argument" # Expected 3 to equal 7
|
16
|
+
fails "Proc#arity for instances created with proc { || } returns positive values for definition \n @a = proc { |(a, (*b, c)), d=1| }\n @b = proc { |a, (*b, c), d, (*e), (*), **k| }"
|
17
|
+
fails "Proc#arity for instances created with proc { || } returns positive values for definition \n @a = proc { |a, b=1| }\n @b = proc { |a, b, c=1, d=2| }"
|
18
|
+
fails "Proc#arity for instances created with proc { || } returns zero for definition \n @a = proc { |**k, &l| }\n @b = proc { |a: 1, b: 2, **k| }"
|
19
|
+
fails "Proc#arity for instances created with proc { || } returns zero for definition \n @a = proc { |a: 1| }\n @b = proc { |a: 1, b: 2| }"
|
20
|
+
fails "Proc#arity for instances created with proc { || } returns zero for definition \n @a = proc { |a=1, b: 2| }\n @b = proc { |a=1, b: 2| }"
|
21
|
+
fails "Proc#arity for instances created with proc { || } returns zero for definition \n @a = proc { |a=1| }\n @b = proc { |a=1, b=2| }"
|
22
|
+
fails "Proc#binding returns a Binding instance"
|
23
|
+
fails "Proc#binding returns the binding associated with self"
|
24
|
+
fails "Proc#call can call its block argument declared with a block argument" # Expected 6 to equal 10
|
25
|
+
fails "Proc#call yields to the block given at declaration and not to the block argument" # Expected 3 to equal 7
|
26
|
+
fails "Proc#curry with arity argument returns Procs with arities of -1 regardless of the value of _arity_"
|
27
|
+
fails "Proc#curry with arity argument returns a Proc if called on a lambda that requires fewer than _arity_ arguments but may take more" # ArgumentError: wrong number of arguments (4 for 5)
|
28
|
+
fails "Proc#eql? is a public method" # Expected Proc to have public instance method 'eql?' but it does not
|
29
|
+
fails "Proc#eql? returns true if other is a dup of the original" # Expected false to be true
|
30
|
+
fails "Proc#inspect for a proc created with Proc.new has a binary encoding" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
|
31
|
+
fails "Proc#inspect for a proc created with Proc.new returns a description including file and line number" # Expected "#<Proc:0x200>" =~ /^#<Proc:([^ ]*?)@ruby\/core\/proc\/shared\/to_s\.rb:6>$/ to be truthy but was nil
|
32
|
+
fails "Proc#inspect for a proc created with Symbol#to_proc has a binary encoding" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
|
33
|
+
fails "Proc#inspect for a proc created with Symbol#to_proc has an ASCII-8BIT encoding" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
|
34
|
+
fails "Proc#inspect for a proc created with Symbol#to_proc returns a description including '(&:symbol)'" # Expected "#<Proc:0x75d4e>" to match /^#<Proc:0x\h+\(&:foobar\)>$/
|
35
|
+
fails "Proc#inspect for a proc created with UnboundMethod#to_proc has a binary encoding" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
|
36
|
+
fails "Proc#inspect for a proc created with UnboundMethod#to_proc returns a description including '(lambda)' and optionally including file and line number"
|
37
|
+
fails "Proc#inspect for a proc created with lambda has a binary encoding" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
|
38
|
+
fails "Proc#inspect for a proc created with lambda returns a description including '(lambda)' and including file and line number" # Expected "#<Proc:0x22e>" =~ /^#<Proc:([^ ]*?)@ruby\/core\/proc\/shared\/to_s\.rb:16 \(lambda\)>$/ to be truthy but was nil
|
39
|
+
fails "Proc#inspect for a proc created with lambda returns a description including '(lambda)' and optionally including file and line number"
|
40
|
+
fails "Proc#inspect for a proc created with proc has a binary encoding" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
|
41
|
+
fails "Proc#inspect for a proc created with proc returns a description including file and line number" # Expected "#<Proc:0x25a>" =~ /^#<Proc:([^ ]*?)@ruby\/core\/proc\/shared\/to_s\.rb:26>$/ to be truthy but was nil
|
42
|
+
fails "Proc#lambda? is preserved when passing a Proc with & to the lambda keyword"
|
43
|
+
fails "Proc#lambda? is preserved when passing a Proc with & to the proc keyword"
|
44
|
+
fails "Proc#source_location returns an Array"
|
45
|
+
fails "Proc#source_location returns the first line of a multi-line proc (i.e. the line containing 'proc do')"
|
46
|
+
fails "Proc#source_location returns the location of the proc's body; not necessarily the proc itself"
|
47
|
+
fails "Proc#source_location returns the same value for a proc-ified method as the method reports" # Expected ["ruby/core/proc/fixtures/source_location.rb", 3] to equal nil
|
48
|
+
fails "Proc#source_location sets the first value to the path of the file in which the proc was defined"
|
49
|
+
fails "Proc#source_location sets the last value to a Fixnum representing the line on which the proc was defined"
|
50
|
+
fails "Proc#source_location sets the last value to an Integer representing the line on which the proc was defined" # NoMethodError: undefined method `last' for nil
|
51
|
+
fails "Proc#source_location works even if the proc was created on the same line"
|
52
|
+
fails "Proc#to_s for a proc created with Proc.new has a binary encoding" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
|
53
|
+
fails "Proc#to_s for a proc created with Proc.new returns a description including file and line number" # Expected "#<Proc:0x17cc0>" =~ /^#<Proc:([^ ]*?)@ruby\/core\/proc\/shared\/to_s\.rb:6>$/ to be truthy but was nil
|
54
|
+
fails "Proc#to_s for a proc created with Symbol#to_proc has a binary encoding" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
|
55
|
+
fails "Proc#to_s for a proc created with Symbol#to_proc has an ASCII-8BIT encoding" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
|
56
|
+
fails "Proc#to_s for a proc created with Symbol#to_proc returns a description including '(&:symbol)'" # Expected "#<Proc:0x6cd2c>" to match /^#<Proc:0x\h+\(&:foobar\)>$/
|
57
|
+
fails "Proc#to_s for a proc created with UnboundMethod#to_proc has a binary encoding" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
|
58
|
+
fails "Proc#to_s for a proc created with UnboundMethod#to_proc returns a description including '(lambda)' and optionally including file and line number"
|
59
|
+
fails "Proc#to_s for a proc created with lambda has a binary encoding" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
|
60
|
+
fails "Proc#to_s for a proc created with lambda returns a description including '(lambda)' and including file and line number" # Expected "#<Proc:0x17cec>" =~ /^#<Proc:([^ ]*?)@ruby\/core\/proc\/shared\/to_s\.rb:16 \(lambda\)>$/ to be truthy but was nil
|
61
|
+
fails "Proc#to_s for a proc created with lambda returns a description including '(lambda)' and optionally including file and line number"
|
62
|
+
fails "Proc#to_s for a proc created with proc has a binary encoding" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
|
63
|
+
fails "Proc#to_s for a proc created with proc returns a description including file and line number" # Expected "#<Proc:0x17d18>" =~ /^#<Proc:([^ ]*?)@ruby\/core\/proc\/shared\/to_s\.rb:26>$/ to be truthy but was nil
|
64
|
+
fails "Proc#yield can call its block argument declared with a block argument" # Expected 6 to equal 10
|
65
|
+
fails "Proc#yield yields to the block given at declaration and not to the block argument" # Expected 3 to equal 7
|
66
|
+
fails "Proc.allocate raises a TypeError"
|
67
|
+
fails "Proc.new with a block argument called indirectly from a subclass returns the passed proc created from a block"
|
68
|
+
fails "Proc.new with a block argument called indirectly from a subclass returns the passed proc created from a method"
|
69
|
+
fails "Proc.new with a block argument called indirectly from a subclass returns the passed proc created from a symbol"
|
70
|
+
fails "Proc.new with an associated block called on a subclass of Proc returns an instance of the subclass"
|
71
|
+
fails "Proc.new with an associated block called on a subclass of Proc that does not 'super' in 'initialize' still constructs a functional proc"
|
72
|
+
fails "Proc.new with an associated block called on a subclass of Proc using a reified block parameter returns an instance of the subclass"
|
73
|
+
fails "Proc.new with an associated block calls initialize on the Proc object"
|
74
|
+
fails "Proc.new with an associated block raises a LocalJumpError when context of the block no longer exists"
|
75
|
+
fails "Proc.new with an associated block returns a new Proc instance from the block passed to the containing method"
|
76
|
+
fails "Proc.new with an associated block returns a subclass of Proc"
|
77
|
+
fails "Proc.new without a block raises an ArgumentError when passed no block" # Expected ArgumentError (tried to create Proc object without a block) but got: ArgumentError (tried to create a Proc object without a block)
|
78
|
+
fails "Proc.new without a block uses the implicit block from an enclosing method when called inside a block" # ArgumentError: tried to create a Proc object without a block
|
79
|
+
fails "Proc.new without a block uses the implicit block from an enclosing method"
|
80
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# NOTE: run bin/format-filters after changing this file
|
2
|
+
opal_filter "Random" do
|
3
|
+
fails "Random#bytes returns the same numeric output for a given huge seed across all implementations and platforms" # Expected "z" to equal "_\u0091"
|
4
|
+
fails "Random#bytes returns the same numeric output for a given seed across all implementations and platforms" # Expected "ÚG" to equal "\u0014\\"
|
5
|
+
fails "Random#rand with Range supports custom object types" # Expected "NaN#<struct RandomSpecs::CustomRangeInteger value=1>" (String) to be an instance of RandomSpecs::CustomRangeInteger
|
6
|
+
fails "Random.bytes returns a String of the length given as argument" # NoMethodError: undefined method `bytes' for Random
|
7
|
+
fails "Random.bytes returns a String" # NoMethodError: undefined method `bytes' for Random
|
8
|
+
fails "Random.bytes returns a binary String" # NoMethodError: undefined method `bytes' for Random
|
9
|
+
fails "Random.bytes returns a random binary String" # NoMethodError: undefined method `bytes' for Random
|
10
|
+
fails "Random.random_number returns a Float if no max argument is passed" # NoMethodError: undefined method `random_number' for #<Random:0x12e>
|
11
|
+
fails "Random.random_number returns an Integer if an Integer argument is passed" # NoMethodError: undefined method `random_number' for #<Random:0x12e>
|
12
|
+
fails "Random.raw_seed raises an ArgumentError on a negative size" # NoMethodError: undefined method `raw_seed' for Random
|
13
|
+
fails "Random.raw_seed returns a String of the length given as argument" # NoMethodError: undefined method `raw_seed' for Random
|
14
|
+
fails "Random.raw_seed returns a String" # NoMethodError: undefined method `raw_seed' for Random
|
15
|
+
fails "Random.raw_seed returns a random binary String" # NoMethodError: undefined method `raw_seed' for Random
|
16
|
+
fails "Random.raw_seed returns an ASCII-8BIT String" # NoMethodError: undefined method `raw_seed' for Random
|
17
|
+
fails "Random::DEFAULT changes seed on reboot" # NoMethodError: undefined method `insert' for "rubyexe.rb"
|
18
|
+
fails "Random::DEFAULT is deprecated" # Expected #<Random:0x3e>.equal? Random to be truthy but was false
|
19
|
+
fails "Random::DEFAULT refers to the Random class" # Expected #<Random:0x3e>.equal? Random to be truthy but was false
|
20
|
+
end
|
@@ -0,0 +1,139 @@
|
|
1
|
+
# NOTE: run bin/format-filters after changing this file
|
2
|
+
opal_filter "Range" do
|
3
|
+
fails "Range#% produces an arithmetic sequence with a percent sign in #inspect" # NoMethodError: undefined method `%' for 1..10
|
4
|
+
fails "Range#% works as a Range#step" # NoMethodError: undefined method `%' for 1..10
|
5
|
+
fails "Range#== returns true if the endpoints are == for beginless ranges" # Opal::SyntaxError: undefined method `type' for nil
|
6
|
+
fails "Range#== returns true if the endpoints are == for endless ranges" # Opal::SyntaxError: undefined method `type' for nil
|
7
|
+
fails "Range#== works for endless Ranges" # Opal::SyntaxError: undefined method `type' for nil
|
8
|
+
fails "Range#=== requires #succ method to be implemented" # Expected TypeError (/can't iterate from/) but no exception was raised (true was returned)
|
9
|
+
fails "Range#=== returns true if other is an element of self for endless ranges" # Opal::SyntaxError: undefined method `type' for nil
|
10
|
+
fails "Range#bsearch with Float values with a block returning negative, zero, positive numbers accepts (+/-)Float::INFINITY from the block"
|
11
|
+
fails "Range#bsearch with Float values with a block returning negative, zero, positive numbers returns a boundary element if appropriate" # NoMethodError: undefined method `prev_float' for 3
|
12
|
+
fails "Range#bsearch with Float values with a block returning negative, zero, positive numbers returns an element at an index for which block returns 0 (small numbers)" # TypeError: can't iterate from Float
|
13
|
+
fails "Range#bsearch with Float values with a block returning negative, zero, positive numbers returns an element at an index for which block returns 0"
|
14
|
+
fails "Range#bsearch with Float values with a block returning negative, zero, positive numbers returns nil if the block never returns zero"
|
15
|
+
fails "Range#bsearch with Float values with a block returning negative, zero, positive numbers returns nil if the block returns greater than zero for every element"
|
16
|
+
fails "Range#bsearch with Float values with a block returning negative, zero, positive numbers returns nil if the block returns less than zero for every element"
|
17
|
+
fails "Range#bsearch with Float values with a block returning negative, zero, positive numbers works with infinity bounds" # TypeError: can't iterate from Float
|
18
|
+
fails "Range#bsearch with Float values with a block returning true or false returns a boundary element if appropriate" # NoMethodError: undefined method `prev_float' for 3
|
19
|
+
fails "Range#bsearch with Float values with a block returning true or false returns minimum element if the block returns true for every element"
|
20
|
+
fails "Range#bsearch with Float values with a block returning true or false returns nil if the block returns false for every element"
|
21
|
+
fails "Range#bsearch with Float values with a block returning true or false returns nil if the block returns nil for every element"
|
22
|
+
fails "Range#bsearch with Float values with a block returning true or false returns the smallest element for which block returns true"
|
23
|
+
fails "Range#bsearch with Float values with a block returning true or false works with infinity bounds" # TypeError: can't iterate from Float
|
24
|
+
fails "Range#bsearch with beginless ranges and Float values with a block returning negative, zero, positive numbers accepts (+/-)Float::INFINITY from the block" # Opal::SyntaxError: undefined method `type' for nil
|
25
|
+
fails "Range#bsearch with beginless ranges and Float values with a block returning negative, zero, positive numbers returns an element at an index for which block returns 0" # Opal::SyntaxError: undefined method `type' for nil
|
26
|
+
fails "Range#bsearch with beginless ranges and Float values with a block returning negative, zero, positive numbers returns an element at an index for which block returns 0.0" # Opal::SyntaxError: undefined method `type' for nil
|
27
|
+
fails "Range#bsearch with beginless ranges and Float values with a block returning negative, zero, positive numbers returns nil if the block never returns zero" # Opal::SyntaxError: undefined method `type' for nil
|
28
|
+
fails "Range#bsearch with beginless ranges and Float values with a block returning negative, zero, positive numbers returns nil if the block returns greater than zero for every element" # Opal::SyntaxError: undefined method `type' for nil
|
29
|
+
fails "Range#bsearch with beginless ranges and Float values with a block returning negative, zero, positive numbers returns nil if the block returns less than zero for every element" # Opal::SyntaxError: undefined method `type' for nil
|
30
|
+
fails "Range#bsearch with beginless ranges and Float values with a block returning negative, zero, positive numbers works with infinity bounds" # Opal::SyntaxError: undefined method `type' for nil
|
31
|
+
fails "Range#bsearch with beginless ranges and Float values with a block returning true or false returns nil if the block returns nil for every element" # Opal::SyntaxError: undefined method `type' for nil
|
32
|
+
fails "Range#bsearch with beginless ranges and Float values with a block returning true or false returns nil if the block returns true for every element" # Opal::SyntaxError: undefined method `type' for nil
|
33
|
+
fails "Range#bsearch with beginless ranges and Float values with a block returning true or false returns the smallest element for which block returns true" # Opal::SyntaxError: undefined method `type' for nil
|
34
|
+
fails "Range#bsearch with beginless ranges and Float values with a block returning true or false works with infinity bounds" # Opal::SyntaxError: undefined method `type' for nil
|
35
|
+
fails "Range#bsearch with beginless ranges and Integer values with a block returning negative, zero, positive numbers accepts Float::INFINITY from the block" # Opal::SyntaxError: undefined method `type' for nil
|
36
|
+
fails "Range#bsearch with beginless ranges and Integer values with a block returning negative, zero, positive numbers returns an element at an index for which block returns 0" # Opal::SyntaxError: undefined method `type' for nil
|
37
|
+
fails "Range#bsearch with beginless ranges and Integer values with a block returning negative, zero, positive numbers returns an element at an index for which block returns 0.0" # Opal::SyntaxError: undefined method `type' for nil
|
38
|
+
fails "Range#bsearch with beginless ranges and Integer values with a block returning negative, zero, positive numbers returns nil if the block never returns zero" # Opal::SyntaxError: undefined method `type' for nil
|
39
|
+
fails "Range#bsearch with beginless ranges and Integer values with a block returning negative, zero, positive numbers returns nil if the block returns greater than zero for every element" # Opal::SyntaxError: undefined method `type' for nil
|
40
|
+
fails "Range#bsearch with beginless ranges and Integer values with a block returning true or false returns the smallest element for which block returns true" # Opal::SyntaxError: undefined method `type' for nil
|
41
|
+
fails "Range#bsearch with endless ranges and Float values with a block returning negative, zero, positive numbers accepts (+/-)Float::INFINITY from the block" # Opal::SyntaxError: undefined method `type' for nil
|
42
|
+
fails "Range#bsearch with endless ranges and Float values with a block returning negative, zero, positive numbers returns an element at an index for which block returns 0" # Opal::SyntaxError: undefined method `type' for nil
|
43
|
+
fails "Range#bsearch with endless ranges and Float values with a block returning negative, zero, positive numbers returns an element at an index for which block returns 0.0" # Opal::SyntaxError: undefined method `type' for nil
|
44
|
+
fails "Range#bsearch with endless ranges and Float values with a block returning negative, zero, positive numbers returns nil if the block never returns zero" # Opal::SyntaxError: undefined method `type' for nil
|
45
|
+
fails "Range#bsearch with endless ranges and Float values with a block returning negative, zero, positive numbers returns nil if the block returns greater than zero for every element" # Opal::SyntaxError: undefined method `type' for nil
|
46
|
+
fails "Range#bsearch with endless ranges and Float values with a block returning negative, zero, positive numbers returns nil if the block returns less than zero for every element" # Opal::SyntaxError: undefined method `type' for nil
|
47
|
+
fails "Range#bsearch with endless ranges and Float values with a block returning negative, zero, positive numbers works with infinity bounds" # Opal::SyntaxError: undefined method `type' for nil
|
48
|
+
fails "Range#bsearch with endless ranges and Float values with a block returning true or false returns minimum element if the block returns true for every element" # Opal::SyntaxError: undefined method `type' for nil
|
49
|
+
fails "Range#bsearch with endless ranges and Float values with a block returning true or false returns nil if the block returns false for every element" # Opal::SyntaxError: undefined method `type' for nil
|
50
|
+
fails "Range#bsearch with endless ranges and Float values with a block returning true or false returns nil if the block returns nil for every element" # Opal::SyntaxError: undefined method `type' for nil
|
51
|
+
fails "Range#bsearch with endless ranges and Float values with a block returning true or false returns the smallest element for which block returns true" # Opal::SyntaxError: undefined method `type' for nil
|
52
|
+
fails "Range#bsearch with endless ranges and Float values with a block returning true or false works with infinity bounds" # Opal::SyntaxError: undefined method `type' for nil
|
53
|
+
fails "Range#bsearch with endless ranges and Integer values with a block returning negative, zero, positive numbers accepts -Float::INFINITY from the block" # Opal::SyntaxError: undefined method `type' for nil
|
54
|
+
fails "Range#bsearch with endless ranges and Integer values with a block returning negative, zero, positive numbers returns an element at an index for which block returns 0" # Opal::SyntaxError: undefined method `type' for nil
|
55
|
+
fails "Range#bsearch with endless ranges and Integer values with a block returning negative, zero, positive numbers returns an element at an index for which block returns 0.0" # Opal::SyntaxError: undefined method `type' for nil
|
56
|
+
fails "Range#bsearch with endless ranges and Integer values with a block returning negative, zero, positive numbers returns nil if the block never returns zero" # Opal::SyntaxError: undefined method `type' for nil
|
57
|
+
fails "Range#bsearch with endless ranges and Integer values with a block returning negative, zero, positive numbers returns nil if the block returns less than zero for every element" # Opal::SyntaxError: undefined method `type' for nil
|
58
|
+
fails "Range#bsearch with endless ranges and Integer values with a block returning true or false returns minimum element if the block returns true for every element" # Opal::SyntaxError: undefined method `type' for nil
|
59
|
+
fails "Range#bsearch with endless ranges and Integer values with a block returning true or false returns the smallest element for which block returns true" # Opal::SyntaxError: undefined method `type' for nil
|
60
|
+
fails "Range#count returns Infinity for beginless ranges without arguments or blocks" # Opal::SyntaxError: undefined method `type' for nil
|
61
|
+
fails "Range#cover? range argument accepts range argument" # Expected false to be true
|
62
|
+
fails "Range#cover? range argument honors exclusion of right boundary (:exclude_end option)" # Expected false to be true
|
63
|
+
fails "Range#cover? range argument supports boundaries of different comparable types" # Expected false to be true
|
64
|
+
fails "Range#cover? returns true if other is an element of self for endless ranges" # Opal::SyntaxError: undefined method `type' for nil
|
65
|
+
fails "Range#each raises a TypeError beginless ranges" # Expected TypeError but got: Opal::SyntaxError (undefined method `type' for nil)
|
66
|
+
fails "Range#each raises a TypeError if the first element is a Time object"
|
67
|
+
fails "Range#each works with String endless ranges" # Opal::SyntaxError: undefined method `type' for nil
|
68
|
+
fails "Range#each works with endless ranges" # Opal::SyntaxError: undefined method `type' for nil
|
69
|
+
fails "Range#eql? returns false if the endpoints are not eql?"
|
70
|
+
fails "Range#eql? works for endless Ranges" # Opal::SyntaxError: undefined method `type' for nil
|
71
|
+
fails "Range#first raises a RangeError when called on an beginless range" # Expected RangeError but got: Opal::SyntaxError (undefined method `type' for nil)
|
72
|
+
fails "Range#first raises a TypeError if #to_int does not return an Integer"
|
73
|
+
fails "Range#hash generates a Fixnum for the hash value"
|
74
|
+
fails "Range#hash generates an Integer for the hash value" # Expected "A,1,1,0" (String) to be an instance of Integer
|
75
|
+
fails "Range#include? on string elements returns false if other is not matched by element.succ" # Expected true to be false
|
76
|
+
fails "Range#include? returns true if other is an element of self for endless ranges" # Opal::SyntaxError: undefined method `type' for nil
|
77
|
+
fails "Range#include? with weird succ when excluded end value returns false if other is not matched by element.succ" # Expected true to be false
|
78
|
+
fails "Range#include? with weird succ when included end value returns false if other is equal as last element but not matched by element.succ" # Expected true to be false
|
79
|
+
fails "Range#include? with weird succ when included end value returns false if other is not matched by element.succ" # Expected true to be false
|
80
|
+
fails "Range#initialize raises a FrozenError if called on an already initialized Range" # Expected FrozenError but got: NameError ('initialize' called twice)
|
81
|
+
fails "Range#inspect works for beginless ranges" # Opal::SyntaxError: undefined method `type' for nil
|
82
|
+
fails "Range#inspect works for endless ranges" # Opal::SyntaxError: undefined method `type' for nil
|
83
|
+
fails "Range#inspect works for nil ... nil ranges" # Opal::SyntaxError: undefined method `type' for nil
|
84
|
+
fails "Range#last raises a RangeError when called on an endless range" # Expected RangeError but got: Opal::SyntaxError (undefined method `type' for nil)
|
85
|
+
fails "Range#last raises a TypeError if #to_int does not return an Integer"
|
86
|
+
fails "Range#max given a block calls #> and #< on the return value of the block"
|
87
|
+
fails "Range#max given a block raises RangeError when called with custom comparison method on an beginless range" # Expected RangeError but got: Opal::SyntaxError (undefined method `type' for nil)
|
88
|
+
fails "Range#max raises RangeError when called on an endless range" # Expected RangeError but got: Opal::SyntaxError (undefined method `type' for nil)
|
89
|
+
fails "Range#max raises TypeError when called on a Time...Time(excluded end point)"
|
90
|
+
fails "Range#max raises TypeError when called on an exclusive range and a non Integer value"
|
91
|
+
fails "Range#max raises for an exclusive beginless range" # Expected TypeError (cannot exclude end value with non Integer begin value) but got: Opal::SyntaxError (undefined method `type' for nil)
|
92
|
+
fails "Range#max returns the end point for beginless ranges" # Opal::SyntaxError: undefined method `type' for nil
|
93
|
+
fails "Range#max returns the maximum value in the range when called with no arguments"
|
94
|
+
fails "Range#member? on string elements returns false if other is not matched by element.succ"
|
95
|
+
fails "Range#member? returns true if other is an element of self for endless ranges" # Opal::SyntaxError: undefined method `type' for nil
|
96
|
+
fails "Range#member? with weird succ when excluded end value returns false if other is not matched by element.succ"
|
97
|
+
fails "Range#member? with weird succ when included end value returns false if other is equal as last element but not matched by element.succ"
|
98
|
+
fails "Range#member? with weird succ when included end value returns false if other is not matched by element.succ"
|
99
|
+
fails "Range#min given a block calls #> and #< on the return value of the block"
|
100
|
+
fails "Range#min given a block raises RangeError when called with custom comparison method on an endless range" # Expected RangeError but got: Opal::SyntaxError (undefined method `type' for nil)
|
101
|
+
fails "Range#min raises RangeError when called on an beginless range" # Expected RangeError but got: Opal::SyntaxError (undefined method `type' for nil)
|
102
|
+
fails "Range#min returns the start point for endless ranges" # Opal::SyntaxError: undefined method `type' for nil
|
103
|
+
fails "Range#minmax on an exclusive range raises TypeError if the end value is not an integer" # Expected TypeError (cannot exclude non Integer end value) but got: TypeError (can't iterate from Float)
|
104
|
+
fails "Range#minmax on an exclusive range should raise RangeError on a beginless range" # ArgumentError: bad value for range
|
105
|
+
fails "Range#minmax on an exclusive range should raise RangeError on an endless range" # Mock 'x': method <=> called with unexpected arguments (nil)
|
106
|
+
fails "Range#minmax on an inclusive range raises RangeError or ArgumentError on a beginless range" # ArgumentError: bad value for range
|
107
|
+
fails "Range#minmax on an inclusive range should raise RangeError on an endless range without iterating the range" # Mock 'x': method <=> called with unexpected arguments (nil)
|
108
|
+
fails "Range#minmax on an inclusive range should return the minimum and maximum values for a non-numeric range without iterating the range" # Mock 'x' expected to receive succ("any_args") exactly 0 times but received it 1 times
|
109
|
+
fails "Range#minmax on an inclusive range should return the minimum and maximum values for a numeric range without iterating the range" # TypeError: can't iterate from Float
|
110
|
+
fails "Range#size returns Float::INFINITY for all beginless ranges" # Opal::SyntaxError: undefined method `type' for nil
|
111
|
+
fails "Range#size returns Float::INFINITY for endless ranges if the start is numeric" # Opal::SyntaxError: undefined method `type' for nil
|
112
|
+
fails "Range#size returns nil for endless ranges if the start is not numeric" # Opal::SyntaxError: undefined method `type' for nil
|
113
|
+
fails "Range#step when no block is given raises an ArgumentError if step is 0" # Expected ArgumentError but no exception was raised (#<Enumerator: -1..1:step(0)> was returned)
|
114
|
+
fails "Range#step when no block is given returned Enumerator size raises a TypeError if #to_int does not return an Integer" # Expected TypeError but no exception was raised (#<Enumerator: 1..2:step(#<MockObject:0x13494>)> was returned)
|
115
|
+
fails "Range#step when no block is given returned Enumerator size raises a TypeError if step does not respond to #to_int" # Expected TypeError but no exception was raised (#<Enumerator: 1..2:step(#<MockObject:0x13478>)> was returned)
|
116
|
+
fails "Range#step when no block is given returned Enumerator size returns the ceil of range size divided by the number of steps even if step is negative" # ArgumentError: step can't be negative
|
117
|
+
fails "Range#step when no block is given returned Enumerator type when both begin and end are numerics returns an instance of Enumerator::ArithmeticSequence" # Expected Enumerator == Enumerator::ArithmeticSequence to be truthy but was false
|
118
|
+
fails "Range#step with an endless range and Float values handles infinite values at the start" # Opal::SyntaxError: undefined method `type' for nil
|
119
|
+
fails "Range#step with an endless range and Float values yields Float values incremented by 1 and less than end when not passed a step" # Opal::SyntaxError: undefined method `type' for nil
|
120
|
+
fails "Range#step with an endless range and Float values yields Float values incremented by a Float step" # Opal::SyntaxError: undefined method `type' for nil
|
121
|
+
fails "Range#step with an endless range and Float values yields Float values incremented by an Integer step" # Opal::SyntaxError: undefined method `type' for nil
|
122
|
+
fails "Range#step with an endless range and Integer values yield Integer values incremented by 1 when not passed a step" # Opal::SyntaxError: undefined method `type' for nil
|
123
|
+
fails "Range#step with an endless range and Integer values yields Float values incremented by a Float step" # Opal::SyntaxError: undefined method `type' for nil
|
124
|
+
fails "Range#step with an endless range and Integer values yields Integer values incremented by an Integer step" # Opal::SyntaxError: undefined method `type' for nil
|
125
|
+
fails "Range#step with an endless range and String values raises a TypeError when passed a Float step" # Expected TypeError but got: Opal::SyntaxError (undefined method `type' for nil)
|
126
|
+
fails "Range#step with an endless range and String values yields String values incremented by #succ and less than or equal to end when not passed a step" # Opal::SyntaxError: undefined method `type' for nil
|
127
|
+
fails "Range#step with an endless range and String values yields String values incremented by #succ called Integer step times" # Opal::SyntaxError: undefined method `type' for nil
|
128
|
+
fails "Range#step with exclusive end and Float values returns Float values of 'step * n + begin < end'" # precision errors
|
129
|
+
fails "Range#step with exclusive end and String values raises a TypeError when passed a Float step" # requires Fixnum != Float
|
130
|
+
fails "Range#step with inclusive end and Float values returns Float values of 'step * n + begin <= end'" # precision errors
|
131
|
+
fails "Range#step with inclusive end and String values raises a TypeError when passed a Float step" # requires Fixnum != Float
|
132
|
+
fails "Range#to_a throws an exception for beginless ranges" # Expected TypeError but got: Opal::SyntaxError (undefined method `type' for nil)
|
133
|
+
fails "Range#to_a throws an exception for endless ranges" # Expected RangeError but got: Opal::SyntaxError (undefined method `type' for nil)
|
134
|
+
fails "Range#to_s can show endless ranges" # Opal::SyntaxError: undefined method `type' for nil
|
135
|
+
fails "Range.new beginless/endless range allows beginless left boundary" # ArgumentError: bad value for range
|
136
|
+
fails "Range.new beginless/endless range allows endless right boundary" # ArgumentError: bad value for range
|
137
|
+
fails "Range.new beginless/endless range distinguishes ranges with included and excluded right boundary" # ArgumentError: bad value for range
|
138
|
+
fails_badly "Range#minmax on an exclusive range should return the minimum and maximum values for a numeric range without iterating the range"
|
139
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# NOTE: run bin/format-filters after changing this file
|
2
|
+
opal_filter "Rational" do
|
3
|
+
fails "Rational#coerce coerces to Rational, when given a Complex" # Expected nil == [(5/1), (3/4)] to be truthy but was false
|
4
|
+
fails "Rational#coerce raises an error when passed a BigDecimal" # Expected TypeError (/BigDecimal can't be coerced into Rational/) but no exception was raised (nil was returned)
|
5
|
+
fails "Rational#marshal_dump dumps numerator and denominator"
|
6
|
+
fails "Rational#round with half option raise for a non-existent round mode" # TypeError: not an Integer
|
7
|
+
fails "Rational#round with half option returns a Rational when the precision is greater than 0" # ArgumentError: [Rational#round] wrong number of arguments(2 for -1)
|
8
|
+
fails "Rational#round with half option returns an Integer when precision is not passed" # TypeError: not an Integer
|
9
|
+
fails "Rational#to_r fails when a BasicObject's to_r does not return a Rational" # NoMethodError: undefined method `nil?' for BasicObject
|
10
|
+
fails "Rational#to_r raises TypeError trying to convert BasicObject" # NoMethodError: undefined method `nil?' for BasicObject
|
11
|
+
fails "Rational#to_r works when a BasicObject has to_r" # NoMethodError: undefined method `nil?' for BasicObject
|
12
|
+
end
|
@@ -0,0 +1,91 @@
|
|
1
|
+
# NOTE: run bin/format-filters after changing this file
|
2
|
+
opal_filter "regular_expressions" do
|
3
|
+
fails "MatchData#inspect returns a human readable representation of named captures" # Exception: named captures are not supported in javascript: "(?<first>\w+)\s+(?<last>\w+)\s+(\w+)"
|
4
|
+
fails "MatchData#regexp returns a Regexp for the result of gsub(String)" # Expected /\[/gm == /\[/ to be truthy but was false
|
5
|
+
fails "MatchData#string returns a frozen copy of the matched string for gsub(String)" # NotImplementedError: String#gsub! not supported. Mutable String methods are not supported in Opal.
|
6
|
+
fails "MatchData.allocate is undefined" # Expected NoMethodError but no exception was raised (#<MatchData>(#pretty_inspect raised #<NoMethodError: undefined method `named_captures' for nil>) was returned)
|
7
|
+
fails "Regexp#encoding allows otherwise invalid characters if NOENCODING is specified" # NameError: uninitialized constant Regexp::NOENCODING
|
8
|
+
fails "Regexp#encoding defaults to US-ASCII if the Regexp contains only US-ASCII character"
|
9
|
+
fails "Regexp#encoding defaults to UTF-8 if \\u escapes appear"
|
10
|
+
fails "Regexp#encoding defaults to UTF-8 if a literal UTF-8 character appears"
|
11
|
+
fails "Regexp#encoding ignores the default_internal encoding"
|
12
|
+
fails "Regexp#encoding ignores the encoding and uses US-ASCII if the string has only ASCII characters"
|
13
|
+
fails "Regexp#encoding returns ASCII-8BIT if the 'n' modifier is supplied and non-US-ASCII characters are present"
|
14
|
+
fails "Regexp#encoding returns BINARY if the 'n' modifier is supplied and non-US-ASCII characters are present" # NoMethodError: undefined method `encoding' for /\xc2\xa1/
|
15
|
+
fails "Regexp#encoding returns EUC_JP if the 'e' modifier is supplied"
|
16
|
+
fails "Regexp#encoding returns US_ASCII if the 'n' modifier is supplied and only US-ASCII characters are present"
|
17
|
+
fails "Regexp#encoding returns UTF-8 if the 'u' modifier is supplied"
|
18
|
+
fails "Regexp#encoding returns Windows-31J if the 's' modifier is supplied"
|
19
|
+
fails "Regexp#encoding returns an Encoding object"
|
20
|
+
fails "Regexp#encoding upgrades the encoding to that of an embedded String"
|
21
|
+
fails "Regexp#fixed_encoding? returns false by default"
|
22
|
+
fails "Regexp#fixed_encoding? returns false if the 'n' modifier was supplied to the Regexp"
|
23
|
+
fails "Regexp#fixed_encoding? returns true if the 'e' modifier was supplied to the Regexp"
|
24
|
+
fails "Regexp#fixed_encoding? returns true if the 's' modifier was supplied to the Regexp"
|
25
|
+
fails "Regexp#fixed_encoding? returns true if the 'u' modifier was supplied to the Regexp"
|
26
|
+
fails "Regexp#fixed_encoding? returns true if the Regexp contains a UTF-8 literal"
|
27
|
+
fails "Regexp#fixed_encoding? returns true if the Regexp contains a \\u escape"
|
28
|
+
fails "Regexp#fixed_encoding? returns true if the Regexp was created with the Regexp::FIXEDENCODING option"
|
29
|
+
fails "Regexp#hash is based on the text and options of Regexp"
|
30
|
+
fails "Regexp#hash returns the same value for two Regexps differing only in the /n option"
|
31
|
+
fails "Regexp#initialize raises a SecurityError on a Regexp literal"
|
32
|
+
fails "Regexp#initialize raises a TypeError on an initialized non-literal Regexp"
|
33
|
+
fails "Regexp#inspect does not include a character set code"
|
34
|
+
fails "Regexp#inspect does not include the 'o' option"
|
35
|
+
fails "Regexp#inspect returns options in the order 'mixn'"
|
36
|
+
fails "Regexp#named_captures returns a Hash"
|
37
|
+
fails "Regexp#named_captures returns an empty Hash when there are no capture groups"
|
38
|
+
fails "Regexp#named_captures sets each element of the Array to the corresponding group's index"
|
39
|
+
fails "Regexp#named_captures sets the keys of the Hash to the names of the capture groups"
|
40
|
+
fails "Regexp#named_captures sets the values of the Hash to Arrays"
|
41
|
+
fails "Regexp#named_captures works with duplicate capture group names"
|
42
|
+
fails "Regexp#names returns all of the named captures"
|
43
|
+
fails "Regexp#names returns an Array"
|
44
|
+
fails "Regexp#names returns an empty Array if there are no named captures"
|
45
|
+
fails "Regexp#names returns each capture name only once"
|
46
|
+
fails "Regexp#names returns each named capture as a String"
|
47
|
+
fails "Regexp#names works with nested named captures"
|
48
|
+
fails "Regexp#source will remove escape characters" # Expected "foo\\/bar" to equal "foo/bar"
|
49
|
+
fails "Regexp#to_s deals properly with the two types of lookahead groups"
|
50
|
+
fails "Regexp#to_s returns a string in (?xxx:yyy) notation"
|
51
|
+
fails "Regexp#to_s shows all options as excluded if none are selected"
|
52
|
+
fails "Regexp#to_s shows non-included options after a - sign"
|
53
|
+
fails "Regexp#to_s shows the pattern after the options"
|
54
|
+
fails "Regexp.compile given a Regexp does not honour options given as additional arguments" # Expected warning to match: /flags ignored/ but got: ""
|
55
|
+
fails "Regexp.compile given a String accepts a Fixnum of two or more options ORed together as the second argument" # Expected 0 not to equal 0
|
56
|
+
fails "Regexp.compile given a String accepts an Integer of two or more options ORed together as the second argument" # Expected 0 == 0 to be falsy but was true
|
57
|
+
fails "Regexp.compile given a String ignores the third argument if it is 'e' or 'euc' (case-insensitive)" # ArgumentError: [Regexp.new] wrong number of arguments(3 for -2)
|
58
|
+
fails "Regexp.compile given a String ignores the third argument if it is 's' or 'sjis' (case-insensitive)" # ArgumentError: [Regexp.new] wrong number of arguments(3 for -2)
|
59
|
+
fails "Regexp.compile given a String ignores the third argument if it is 'u' or 'utf8' (case-insensitive)" # ArgumentError: [Regexp.new] wrong number of arguments(3 for -2)
|
60
|
+
fails "Regexp.compile given a String raises a RegexpError when passed an incorrect regexp" # Exception: Invalid regular expression: /^[$/: Unterminated character class
|
61
|
+
fails "Regexp.compile given a String uses ASCII_8BIT encoding if third argument is 'n' or 'none' (case insensitive) and non-ascii characters" # ArgumentError: [Regexp.new] wrong number of arguments(3 for -2)
|
62
|
+
fails "Regexp.compile given a String uses US_ASCII encoding if third argument is 'n' or 'none' (case insensitive) and only ascii characters" # ArgumentError: [Regexp.new] wrong number of arguments(3 for -2)
|
63
|
+
fails "Regexp.compile given a String with escaped characters raises a RegexpError if \\x is not followed by any hexadecimal digits" # Expected RegexpError but no exception was raised (/\xn/ was returned)
|
64
|
+
fails "Regexp.compile given a String with escaped characters raises a RegexpError if less than four digits are given for \\uHHHH" # Expected RegexpError but no exception was raised (/\u304/ was returned)
|
65
|
+
fails "Regexp.compile given a String with escaped characters raises a RegexpError if more than six hexadecimal digits are given" # Expected RegexpError but no exception was raised (/\u{0ffffff}/ was returned)
|
66
|
+
fails "Regexp.compile given a String with escaped characters raises a RegexpError if the \\u{} escape is empty" # Expected RegexpError but no exception was raised (/\u{}/ was returned)
|
67
|
+
fails "Regexp.compile given a String with escaped characters returns a Regexp with US-ASCII encoding if UTF-8 escape sequences using only 7-bit ASCII are present" # NoMethodError: undefined method `encoding' for /a/
|
68
|
+
fails "Regexp.compile given a String with escaped characters returns a Regexp with US-ASCII encoding if only 7-bit ASCII characters are present regardless of the input String's encoding" # NoMethodError: undefined method `encoding' for /abc/
|
69
|
+
fails "Regexp.compile given a String with escaped characters returns a Regexp with UTF-8 encoding if any UTF-8 escape sequences outside 7-bit ASCII are present" # NoMethodError: undefined method `encoding' for /ÿ/
|
70
|
+
fails "Regexp.compile given a String with escaped characters returns a Regexp with source String having US-ASCII encoding if UTF-8 escape sequences using only 7-bit ASCII are present" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
|
71
|
+
fails "Regexp.compile given a String with escaped characters returns a Regexp with source String having US-ASCII encoding if only 7-bit ASCII characters are present regardless of the input String's encoding" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
|
72
|
+
fails "Regexp.compile given a String with escaped characters returns a Regexp with source String having the input String's encoding" # NameError: uninitialized constant Encoding::Shift_JIS
|
73
|
+
fails "Regexp.compile given a String with escaped characters returns a Regexp with the input String's encoding" # NameError: uninitialized constant Encoding::Shift_JIS
|
74
|
+
fails "Regexp.compile works by default for subclasses with overridden #initialize" # Expected /hi/ (Regexp) to be kind of RegexpSpecsSubclass
|
75
|
+
fails "Regexp.escape sets the encoding of the result to BINARY if any non-US-ASCII characters are present in an input String with invalid encoding" # Expected true to be false
|
76
|
+
fails "Regexp.last_match returns nil when there is no match" # NoMethodError: undefined method `[]' for nil
|
77
|
+
fails "Regexp.last_match when given a String returns a named capture" # Exception: named captures are not supported in javascript: "(?<test>[A-Z]+.*)"
|
78
|
+
fails "Regexp.last_match when given a Symbol raises an IndexError when given a missing name" # Exception: named captures are not supported in javascript: "(?<test>[A-Z]+.*)"
|
79
|
+
fails "Regexp.last_match when given a Symbol returns a named capture" # Exception: named captures are not supported in javascript: "(?<test>[A-Z]+.*)"
|
80
|
+
fails "Regexp.last_match when given an Object coerces argument to an index using #to_int" # Exception: named captures are not supported in javascript: "(?<test>[A-Z]+.*)"
|
81
|
+
fails "Regexp.last_match when given an Object raises a TypeError when unable to coerce" # Exception: named captures are not supported in javascript: "(?<test>[A-Z]+.*)"
|
82
|
+
fails "Regexp.new given a String accepts an Integer of two or more options ORed together as the second argument" # Expected 0 == 0 to be falsy but was true
|
83
|
+
fails "Regexp.new given a String raises a RegexpError when passed an incorrect regexp"
|
84
|
+
fails "Regexp.new given a String with escaped characters raises a RegexpError if \\x is not followed by any hexadecimal digits"
|
85
|
+
fails "Regexp.new given a String with escaped characters raises a RegexpError if more than six hexadecimal digits are given"
|
86
|
+
fails "Regexp.new works by default for subclasses with overridden #initialize"
|
87
|
+
fails "Regexp.quote sets the encoding of the result to BINARY if any non-US-ASCII characters are present in an input String with invalid encoding" # Expected true to be false
|
88
|
+
fails "Regexp.try_convert returns nil if given an argument that can't be converted to a Regexp"
|
89
|
+
fails "Regexp.try_convert tries to coerce the argument by calling #to_regexp"
|
90
|
+
fails "Regexp.union uses to_regexp to convert argument" # Mock 'pattern' expected to receive to_regexp("any_args") exactly 1 times but received it 0 times
|
91
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# NOTE: run bin/format-filters after changing this file
|
2
|
+
opal_filter "Set" do
|
3
|
+
fails "Set#& raises an ArgumentError when passed a non-Enumerable"
|
4
|
+
fails "Set#& returns a new Set containing only elements shared by self and the passed Enumerable"
|
5
|
+
fails "Set#== does not depend on the order of nested Sets"
|
6
|
+
fails "Set#== returns true when the passed Object is a Set and self and the Object contain the same elements"
|
7
|
+
fails "Set#=== is an alias for include?" # Expected #<Method: Set#=== (defined in Kernel in corelib/kernel.rb:14)> to equal #<Method: Set#include? (defined in Set in set.rb:125)>
|
8
|
+
fails "Set#=== member equality is checked using both #hash and #eql?" # Expected false to equal true
|
9
|
+
fails "Set#=== returns true when self contains the passed Object" # Expected false to be true
|
10
|
+
fails "Set#^ raises an ArgumentError when passed a non-Enumerable"
|
11
|
+
fails "Set#^ returns a new Set containing elements that are not in both self and the passed Enumerable" # NoMethodError: undefined method `^' for #<Set: {1,2,3,4}>
|
12
|
+
fails "Set#compare_by_identity causes future comparisons on the receiver to be made by identity" # NoMethodError: undefined method `compare_by_identity' for #<Set: {1}>
|
13
|
+
fails "Set#compare_by_identity compares its members by identity" # NoMethodError: undefined method `compare_by_identity' for #<Set: {}>
|
14
|
+
fails "Set#compare_by_identity does not call #hash on members" # NoMethodError: undefined method `compare_by_identity' for #<Set: {}>
|
15
|
+
fails "Set#compare_by_identity is idempotent and has no effect on an already compare_by_identity set" # NoMethodError: undefined method `compare_by_identity' for #<Set: {}>
|
16
|
+
fails "Set#compare_by_identity is not equal to set what does not compare by identity" # NoMethodError: undefined method `compare_by_identity' for #<Set: {1,2}>
|
17
|
+
fails "Set#compare_by_identity persists over #clones" # NoMethodError: undefined method `compare_by_identity' for #<Set: {}>
|
18
|
+
fails "Set#compare_by_identity persists over #dups" # NoMethodError: undefined method `compare_by_identity' for #<Set: {}>
|
19
|
+
fails "Set#compare_by_identity regards #clone'd objects as having different identities" # NoMethodError: undefined method `compare_by_identity' for #<Set: {}>
|
20
|
+
fails "Set#compare_by_identity regards #dup'd objects as having different identities" # NoMethodError: undefined method `compare_by_identity' for #<Set: {}>
|
21
|
+
fails "Set#compare_by_identity rehashes internally so that old members can be looked up" # NoMethodError: undefined method `compare_by_identity' for #<Set: {1,2,3,4,5,6,7,8,9,10,#<Object:0x13a2>}>
|
22
|
+
fails "Set#compare_by_identity returns self" # NoMethodError: undefined method `compare_by_identity' for #<Set: {}>
|
23
|
+
fails "Set#compare_by_identity uses #equal? semantics, but doesn't actually call #equal? to determine identity" # NoMethodError: undefined method `compare_by_identity' for #<Set: {}>
|
24
|
+
fails "Set#compare_by_identity uses the semantics of BasicObject#equal? to determine members identity" # NoMethodError: undefined method `compare_by_identity' for #<Set: {}>
|
25
|
+
fails "Set#compare_by_identity? returns false by default" # NoMethodError: undefined method `compare_by_identity?' for #<Set: {}>
|
26
|
+
fails "Set#compare_by_identity? returns true once #compare_by_identity has been invoked on self" # NoMethodError: undefined method `compare_by_identity' for #<Set: {}>
|
27
|
+
fails "Set#compare_by_identity? returns true when called multiple times on the same set" # NoMethodError: undefined method `compare_by_identity' for #<Set: {}>
|
28
|
+
fails "Set#divide divides self into a set of subsets based on the blocks return values"
|
29
|
+
fails "Set#divide when passed a block with an arity of 2 divides self into a set of subsets based on the blocks return values"
|
30
|
+
fails "Set#divide when passed a block with an arity of 2 yields each two Object to the block"
|
31
|
+
fails "Set#divide yields each Object to the block"
|
32
|
+
fails "Set#flatten raises an ArgumentError when self is recursive"
|
33
|
+
fails "Set#flatten returns a copy of self with each included Set flattened"
|
34
|
+
fails "Set#flatten when Set contains a Set-like object returns a copy of self with each included Set-like object flattened" # NoMethodError: undefined method `flatten' for #<Set: {#<SetSpecs::SetLike:0x8b30c>}>
|
35
|
+
fails "Set#flatten! flattens self"
|
36
|
+
fails "Set#flatten! raises an ArgumentError when self is recursive"
|
37
|
+
fails "Set#flatten! returns nil when self was not modified"
|
38
|
+
fails "Set#flatten! returns self when self was modified"
|
39
|
+
fails "Set#flatten! when Set contains a Set-like object flattens self, including Set-like objects" # NoMethodError: undefined method `flatten!' for #<Set: {#<SetSpecs::SetLike:0x8b318>}>
|
40
|
+
fails "Set#flatten_merge flattens the passed Set and merges it into self"
|
41
|
+
fails "Set#flatten_merge raises an ArgumentError when trying to flatten a recursive Set"
|
42
|
+
fails "Set#hash is static"
|
43
|
+
fails "Set#inspect correctly handles self-references"
|
44
|
+
fails "Set#intersection raises an ArgumentError when passed a non-Enumerable"
|
45
|
+
fails "Set#intersection returns a new Set containing only elements shared by self and the passed Enumerable"
|
46
|
+
fails "Set#merge raises an ArgumentError when passed a non-Enumerable"
|
47
|
+
fails "Set#pretty_print passes the 'pretty print' representation of self to the pretty print writer"
|
48
|
+
fails "Set#pretty_print_cycle passes the 'pretty print' representation of a self-referencing Set to the pretty print writer"
|
49
|
+
fails "Set#to_s correctly handles self-references" # Expected "#<Set:0x865de>" to include "#<Set: {...}>"
|
50
|
+
fails "Set#to_s is an alias of inspect" # Expected #<Method: Set#to_s (defined in Kernel in corelib/kernel.rb:1201)> to equal #<Method: Set#inspect (defined in Set in set.rb:36)>
|
51
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# NOTE: run bin/format-filters after changing this file
|
2
|
+
opal_filter "Singleton" do
|
3
|
+
fails "Singleton._load returns the singleton instance for anything passed in to subclass"
|
4
|
+
fails "Singleton._load returns the singleton instance for anything passed in"
|
5
|
+
fails "Singleton.instance returns an instance of the singleton's clone"
|
6
|
+
fails "Singleton.instance returns the same instance for multiple class to instance on clones"
|
7
|
+
end
|
@@ -0,0 +1,341 @@
|
|
1
|
+
# NOTE: run bin/format-filters after changing this file
|
2
|
+
opal_filter "String" do
|
3
|
+
fails "String#% can produce a string with invalid encoding" # Expected true to be false
|
4
|
+
fails "String#% flags # applies to format o does nothing for negative argument" # Expected "0..7651" to equal "..7651"
|
5
|
+
fails "String#% flags # applies to formats aAeEfgG changes format from dd.dddd to exponential form for gG" # Expected "1.234e+02" to equal "1.e+02"
|
6
|
+
fails "String#% flags # applies to formats aAeEfgG forces a decimal point to be added, even if no digits follow" # NotImplementedError: `A` and `a` format field types are not implemented in Opal yet
|
7
|
+
fails "String#% flags (digit)$ specifies the absolute argument number for this field" # NotImplementedError: `A` and `a` format field types are not implemented in Opal yet
|
8
|
+
fails "String#% flags * left-justifies the result if specified with $ argument is negative" # Expected "1.095200e+2 " to equal "1.095200e+02 "
|
9
|
+
fails "String#% flags * left-justifies the result if width is negative" # Expected "1.095200e+2 " to equal "1.095200e+02 "
|
10
|
+
fails "String#% flags * raises ArgumentError when is mixed with width" # Expected ArgumentError but no exception was raised (" 112" was returned)
|
11
|
+
fails "String#% flags * uses the previous argument as the field width" # Expected " 1.095200e+02" to equal " 1.095200e+02"
|
12
|
+
fails "String#% flags * uses the specified argument as the width if * is followed by a number and $" # Expected " 1.095200e+02" to equal " 1.095200e+02"
|
13
|
+
fails "String#% flags + applies to numeric formats bBdiouxXaAeEfgG adds a leading plus sign to non-negative numbers" # NotImplementedError: `A` and `a` format field types are not implemented in Opal yet
|
14
|
+
fails "String#% flags - left-justifies the result of conversion if width is specified" # Expected "1.095200e+2 " to equal "1.095200e+02 "
|
15
|
+
fails "String#% flags 0 (zero) applies to numeric formats bBdiouxXaAeEfgG and width is specified pads with zeros, not spaces" # Expected "0000000001.095200e+02" to equal "000000001.095200e+02"
|
16
|
+
fails "String#% flags space applies to numeric formats bBdiouxXeEfgGaA does not leave a space at the start of negative numbers" # NotImplementedError: `A` and `a` format field types are not implemented in Opal yet
|
17
|
+
fails "String#% flags space applies to numeric formats bBdiouxXeEfgGaA leaves a space at the start of non-negative numbers" # NotImplementedError: `A` and `a` format field types are not implemented in Opal yet
|
18
|
+
fails "String#% flags space applies to numeric formats bBdiouxXeEfgGaA treats several white spaces as one" # NotImplementedError: `A` and `a` format field types are not implemented in Opal yet
|
19
|
+
fails "String#% float formats A converts floating point argument as [-]0xh.hhhhp[+-]dd and use uppercase X and P" # NotImplementedError: `A` and `a` format field types are not implemented in Opal yet
|
20
|
+
fails "String#% float formats A displays Float::INFINITY as Inf" # NotImplementedError: `A` and `a` format field types are not implemented in Opal yet
|
21
|
+
fails "String#% float formats A displays Float::NAN as NaN" # NotImplementedError: `A` and `a` format field types are not implemented in Opal yet
|
22
|
+
fails "String#% float formats G otherwise cuts excessive digits in fractional part and keeps only 4 ones" # Expected "12.12341111" to equal "12.1234"
|
23
|
+
fails "String#% float formats G otherwise cuts fraction part to have only 6 digits at all" # Expected "1.1234567" to equal "1.12346"
|
24
|
+
fails "String#% float formats G otherwise rounds the last significant digit to the closest one in fractional part" # Expected "1.555555555" to equal "1.55556"
|
25
|
+
fails "String#% float formats G the exponent is greater than or equal to the precision (6 by default) converts a floating point number using exponential form" # Expected "1.234567E+06" to equal "1.23457E+06"
|
26
|
+
fails "String#% float formats a converts floating point argument as [-]0xh.hhhhp[+-]dd" # NotImplementedError: `A` and `a` format field types are not implemented in Opal yet
|
27
|
+
fails "String#% float formats a displays Float::INFINITY as Inf" # NotImplementedError: `A` and `a` format field types are not implemented in Opal yet
|
28
|
+
fails "String#% float formats a displays Float::NAN as NaN" # NotImplementedError: `A` and `a` format field types are not implemented in Opal yet
|
29
|
+
fails "String#% float formats g otherwise cuts excessive digits in fractional part and keeps only 4 ones" # Expected "12.12341111" to equal "12.1234"
|
30
|
+
fails "String#% float formats g otherwise cuts fraction part to have only 6 digits at all" # Expected "1.1234567" to equal "1.12346"
|
31
|
+
fails "String#% float formats g otherwise rounds the last significant digit to the closest one in fractional part" # Expected "1.555555555" to equal "1.55556"
|
32
|
+
fails "String#% float formats g the exponent is greater than or equal to the precision (6 by default) converts a floating point number using exponential form" # Expected "1.234567e+06" to equal "1.23457e+06"
|
33
|
+
fails "String#% integer formats d works well with large numbers" # Expected "1234567890987654400" to equal "1234567890987654321"
|
34
|
+
fails "String#% integer formats i works well with large numbers" # Expected "1234567890987654400" to equal "1234567890987654321"
|
35
|
+
fails "String#% integer formats u works well with large numbers" # Expected "1234567890987654400" to equal "1234567890987654321"
|
36
|
+
fails "String#% other formats % alone raises an ArgumentError" # Expected ArgumentError but no exception was raised ("%" was returned)
|
37
|
+
fails "String#% output's encoding is the same as the format string if passed value is encoding-compatible" # NameError: uninitialized constant Encoding::SHIFT_JIS
|
38
|
+
fails "String#% output's encoding raises if a compatible encoding can't be found" # Expected Encoding::CompatibilityError but no exception was raised ("hello world" was returned)
|
39
|
+
fails "String#% precision float types controls the number of decimal places displayed in fraction part" # NotImplementedError: `A` and `a` format field types are not implemented in Opal yet
|
40
|
+
fails "String#% precision float types does not affect G format" # Expected "12.12340000" to equal "12.1234"
|
41
|
+
fails "String#% precision string formats determines the maximum number of characters to be copied from the string" # Expected "1" to equal "["
|
42
|
+
fails "String#% raises Encoding::CompatibilityError if both encodings are ASCII compatible and there ano not ASCII characters" # ArgumentError: unknown encoding name - windows-1252
|
43
|
+
fails "String#% raises an error if single % appears at the end" # Expected ArgumentError but no exception was raised ("%" was returned)
|
44
|
+
fails "String#% returns a String in the same encoding as the format String if compatible" # NameError: uninitialized constant Encoding::KOI8_U
|
45
|
+
fails "String#% supports inspect formats using %p" # Expected "{\"capture\"=>1}" to equal "{:capture=>1}"
|
46
|
+
fails "String#% width specifies the minimum number of characters that will be written to the result" # Expected " 1.095200e+02" to equal " 1.095200e+02"
|
47
|
+
fails "String#* raises a RangeError when given integer is a Bignum" # Expected RangeError but no exception was raised ("" was returned)
|
48
|
+
fails "String#* returns String instances" # Expected "" (MyString) to be an instance of String
|
49
|
+
fails "String#+ when self is BINARY and argument is US-ASCII uses BINARY encoding" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
|
50
|
+
fails "String#-@ does not deduplicate already frozen strings" # Expected "this string is frozen" not to be identical to "this string is frozen"
|
51
|
+
fails "String#-@ does not deduplicate strings with additional instance variables" # NoMethodError: undefined method `-@' for "this string is frozen"
|
52
|
+
fails "String#-@ does not deduplicate tainted strings" # NoMethodError: undefined method `-@' for "this string is frozen"
|
53
|
+
fails "String#-@ returns the same object for equal unfrozen strings" # Expected "this is a string" not to be identical to "this is a string"
|
54
|
+
fails "String#-@ returns the same object when it's called on the same String literal" # NoMethodError: undefined method `-@' for "unfrozen string"
|
55
|
+
fails "String#<< when self is BINARY and argument is US-ASCII uses BINARY encoding" # NotImplementedError: String#<< not supported. Mutable String methods are not supported in Opal.
|
56
|
+
fails "String#<< with Integer returns a BINARY string if self is US-ASCII and the argument is between 128-255 (inclusive)" # NotImplementedError: String#<< not supported. Mutable String methods are not supported in Opal.
|
57
|
+
fails "String#[] raises a RangeError if the index is too big" # Expected RangeError but no exception was raised (nil was returned)
|
58
|
+
fails "String#[] with Range raises a RangeError if one of the bound is too big" # Expected RangeError but no exception was raised (nil was returned)
|
59
|
+
fails "String#[] with Range raises a type error if a range is passed with a length" # Expected TypeError but no exception was raised ("el" was returned)
|
60
|
+
fails "String#[] with Range returns String instances" # Expected "" (StringSpecs::MyString) to be an instance of String
|
61
|
+
fails "String#[] with Range works with endless ranges" # Opal::SyntaxError: undefined method `type' for nil
|
62
|
+
fails "String#[] with Regexp returns String instances" # Expected "" (StringSpecs::MyString) to be an instance of String
|
63
|
+
fails "String#[] with Regexp, index returns String instances" # Expected "he" (StringSpecs::MyString) to be an instance of String
|
64
|
+
fails "String#[] with String returns a String instance when given a subclass instance" # Expected "el" (StringSpecs::MyString) to be an instance of String
|
65
|
+
fails "String#[] with index, length raises a RangeError if the index or length is too big" # Expected RangeError but no exception was raised (nil was returned)
|
66
|
+
fails "String#[] with index, length returns String instances" # Expected "" (StringSpecs::MyString) to be an instance of String
|
67
|
+
fails "String#[] with index, length returns a string with the same encoding" # ArgumentError: unknown encoding name - ISO-8859-1
|
68
|
+
fails "String#[]= with Integer index allows assignment to the zero'th element of an empty String" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
69
|
+
fails "String#[]= with Integer index calls #to_int to convert the index" # Mock 'string element set' expected to receive to_int("any_args") exactly 1 times but received it 0 times
|
70
|
+
fails "String#[]= with Integer index calls #to_str to convert other to a String" # Mock '-test-' expected to receive to_str("any_args") exactly 1 times but received it 0 times
|
71
|
+
fails "String#[]= with Integer index calls to_int on index" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
72
|
+
fails "String#[]= with Integer index encodes the String in an encoding compatible with the replacement" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
73
|
+
fails "String#[]= with Integer index raises IndexError if the string index doesn't match a position in the string" # Expected IndexError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
|
74
|
+
fails "String#[]= with Integer index raises a FrozenError when self is frozen" # Expected FrozenError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
|
75
|
+
fails "String#[]= with Integer index raises a TypeError if #to_int does not return an Integer" # Expected TypeError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
|
76
|
+
fails "String#[]= with Integer index raises a TypeError if other_str can't be converted to a String" # Expected TypeError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
|
77
|
+
fails "String#[]= with Integer index raises a TypeError if passed an Integer replacement" # Expected TypeError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
|
78
|
+
fails "String#[]= with Integer index raises an Encoding::CompatibilityError if the replacement encoding is incompatible" # NameError: uninitialized constant Encoding::EUC_JP
|
79
|
+
fails "String#[]= with Integer index raises an IndexError if #to_int returns a value out of range" # Expected IndexError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
|
80
|
+
fails "String#[]= with Integer index raises an IndexError if the index is greater than character size" # Expected IndexError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
|
81
|
+
fails "String#[]= with Integer index raises an IndexError without changing self if idx is outside of self" # Expected IndexError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
|
82
|
+
fails "String#[]= with Integer index replaces a character with a multibyte character" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
83
|
+
fails "String#[]= with Integer index replaces a multibyte character with a character" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
84
|
+
fails "String#[]= with Integer index replaces a multibyte character with a multibyte character" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
85
|
+
fails "String#[]= with Integer index replaces the char at idx with other_str" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
86
|
+
fails "String#[]= with Integer index taints self if other_str is tainted" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
87
|
+
fails "String#[]= with Integer index, count appends other_str to the end of the string if idx == the length of the string" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
88
|
+
fails "String#[]= with Integer index, count calls #to_int to convert the index and count objects" # Mock 'string element set index' expected to receive to_int("any_args") exactly 1 times but received it 0 times
|
89
|
+
fails "String#[]= with Integer index, count calls #to_str to convert the replacement object" # Mock 'string element set replacement' expected to receive to_str("any_args") exactly 1 times but received it 0 times
|
90
|
+
fails "String#[]= with Integer index, count counts negative idx values from end of the string" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
91
|
+
fails "String#[]= with Integer index, count deletes a multibyte character" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
92
|
+
fails "String#[]= with Integer index, count deletes characters if other_str is an empty string" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
93
|
+
fails "String#[]= with Integer index, count deletes characters up to the maximum length of the existing string" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
94
|
+
fails "String#[]= with Integer index, count encodes the String in an encoding compatible with the replacement" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
95
|
+
fails "String#[]= with Integer index, count inserts a multibyte character" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
96
|
+
fails "String#[]= with Integer index, count overwrites and deletes characters if count is more than the length of other_str" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
97
|
+
fails "String#[]= with Integer index, count raises a TypeError if #to_int for count does not return an Integer" # Expected TypeError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
|
98
|
+
fails "String#[]= with Integer index, count raises a TypeError if #to_int for index does not return an Integer" # Expected TypeError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
|
99
|
+
fails "String#[]= with Integer index, count raises a TypeError if other_str is a type other than String" # Expected TypeError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
|
100
|
+
fails "String#[]= with Integer index, count raises a TypeError of #to_str does not return a String" # Expected TypeError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
|
101
|
+
fails "String#[]= with Integer index, count raises an Encoding::CompatibilityError if the replacement encoding is incompatible" # NameError: uninitialized constant Encoding::EUC_JP
|
102
|
+
fails "String#[]= with Integer index, count raises an IndexError if count < 0" # Expected IndexError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
|
103
|
+
fails "String#[]= with Integer index, count raises an IndexError if the character index is out of range of a multibyte String" # Expected IndexError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
|
104
|
+
fails "String#[]= with Integer index, count raises an IndexError if |idx| is greater than the length of the string" # Expected IndexError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
|
105
|
+
fails "String#[]= with Integer index, count replaces characters with a multibyte character" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
106
|
+
fails "String#[]= with Integer index, count replaces multibyte characters with characters" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
107
|
+
fails "String#[]= with Integer index, count replaces multibyte characters with multibyte characters" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
108
|
+
fails "String#[]= with Integer index, count starts at idx and overwrites count characters before inserting the rest of other_str" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
109
|
+
fails "String#[]= with Integer index, count taints self if other_str is tainted" # NotImplementedError: String#[]= not supported. Mutable String methods are not supported in Opal.
|
110
|
+
fails "String#[]= with a Regexp index with 3 arguments raises a TypeError if #to_int does not return an Integer" # Expected TypeError but got: NotImplementedError (String#[]= not supported. Mutable String methods are not supported in Opal.)
|
111
|
+
fails "String#ascii_only? with non-ASCII only characters returns false if the encoding is BINARY" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
|
112
|
+
fails "String#bytes yields each byte to a block if one is given, returning self" # Expected [113, 103, 172, 78] to equal "東京"
|
113
|
+
fails "String#byteslice raises a RangeError if the index is too big" # Expected RangeError but no exception was raised (nil was returned)
|
114
|
+
fails "String#byteslice with Range raises a RangeError if one of the bound is too big" # Expected RangeError but no exception was raised (nil was returned)
|
115
|
+
fails "String#byteslice with Range raises a type error if a range is passed with a length" # Expected TypeError but no exception was raised ("el" was returned)
|
116
|
+
fails "String#byteslice with Range returns String instances" # Expected "" (StringSpecs::MyString) to be an instance of String
|
117
|
+
fails "String#byteslice with Range works with endless ranges" # Opal::SyntaxError: undefined method `type' for nil
|
118
|
+
fails "String#byteslice with index, length raises a RangeError if the index or length is too big" # Expected RangeError but no exception was raised (nil was returned)
|
119
|
+
fails "String#byteslice with index, length returns String instances" # Expected "" (StringSpecs::MyString) to be an instance of String
|
120
|
+
fails "String#byteslice with index, length returns a string with the same encoding" # ArgumentError: unknown encoding name - ISO-8859-1
|
121
|
+
fails "String#capitalize ASCII-only case mapping does not capitalize non-ASCII characters" # ArgumentError: [String#capitalize] wrong number of arguments(1 for 0)
|
122
|
+
fails "String#capitalize full Unicode case mapping adapted for Lithuanian allows Turkic as an extra option (and applies Turkic semantics)" # ArgumentError: [String#capitalize] wrong number of arguments(2 for 0)
|
123
|
+
fails "String#capitalize full Unicode case mapping adapted for Lithuanian currently works the same as full Unicode case mapping" # ArgumentError: [String#capitalize] wrong number of arguments(1 for 0)
|
124
|
+
fails "String#capitalize full Unicode case mapping adapted for Turkic languages allows Lithuanian as an extra option" # ArgumentError: [String#capitalize] wrong number of arguments(2 for 0)
|
125
|
+
fails "String#capitalize full Unicode case mapping adapted for Turkic languages capitalizes ASCII characters according to Turkic semantics" # ArgumentError: [String#capitalize] wrong number of arguments(1 for 0)
|
126
|
+
fails "String#capitalize full Unicode case mapping only capitalizes the first resulting character when upcasing a character produces a multi-character sequence" # Expected "SS" to equal "Ss"
|
127
|
+
fails "String#capitalize full Unicode case mapping updates string metadata" # Expected "SSet" to equal "Sset"
|
128
|
+
fails "String#capitalize returns String instances when called on a subclass" # Expected "Hello" (StringSpecs::MyString) to be an instance of String
|
129
|
+
fails "String#capitalize! full Unicode case mapping works for non-ascii-compatible encodings" # NotImplementedError: String#capitalize! not supported. Mutable String methods are not supported in Opal.
|
130
|
+
fails "String#capitalize! modifies self in place for ASCII-only case mapping works for non-ascii-compatible encodings" # NotImplementedError: String#capitalize! not supported. Mutable String methods are not supported in Opal.
|
131
|
+
fails "String#capitalize! modifies self in place for non-ascii-compatible encodings" # NotImplementedError: String#capitalize! not supported. Mutable String methods are not supported in Opal.
|
132
|
+
fails "String#casecmp independent of case returns nil if incompatible encodings" # NameError: uninitialized constant Encoding::EUC_JP
|
133
|
+
fails "String#casecmp? independent of case case folds" # Expected false to be true
|
134
|
+
fails "String#casecmp? independent of case for UNICODE characters returns true when downcase(:fold) on unicode" # Expected false to equal true
|
135
|
+
fails "String#casecmp? independent of case in UTF-8 mode for non-ASCII characters returns true when they are the same with normalized case" # Expected false to equal true
|
136
|
+
fails "String#casecmp? independent of case returns nil if incompatible encodings" # NameError: uninitialized constant Encoding::EUC_JP
|
137
|
+
fails "String#center with length, padding returns String instances when called on subclasses" # Expected " " (StringSpecs::MyString) to be an instance of String
|
138
|
+
fails "String#chomp when passed no argument returns String instances when called on a subclass" # Expected "hello" (StringSpecs::MyString) to be an instance of String
|
139
|
+
fails "String#chop returns String instances when called on a subclass" # Expected "hello" (StringSpecs::MyString) to be an instance of String
|
140
|
+
fails "String#clone calls #initialize_copy on the new instance" # Expected nil to equal "string"
|
141
|
+
fails "String#clone copies singleton methods" # NoMethodError: undefined method `special' for "string"
|
142
|
+
fails "String#codepoints is synonymous with #bytes for Strings which are single-byte optimizable" # Expected [40, 41, 123, 125] to equal [40, 0, 41, 0, 123, 0, 125, 0]
|
143
|
+
fails "String#concat when self is BINARY and argument is US-ASCII uses BINARY encoding" # NoMethodError: undefined method `concat' for "abc"
|
144
|
+
fails "String#concat with Integer returns a BINARY string if self is US-ASCII and the argument is between 128-255 (inclusive)" # NoMethodError: undefined method `concat' for ""
|
145
|
+
fails "String#delete returns String instances when called on a subclass" # Expected "oh no" (StringSpecs::MyString) to be an instance of String
|
146
|
+
fails "String#delete_prefix returns a String instance when called on a subclass instance" # Expected "o" (StringSpecs::MyString) to be an instance of String
|
147
|
+
fails "String#delete_suffix returns a String instance when called on a subclass instance" # Expected "h" (StringSpecs::MyString) to be an instance of String
|
148
|
+
fails "String#downcase ASCII-only case mapping does not downcase non-ASCII characters" # ArgumentError: [String#downcase] wrong number of arguments(1 for 0)
|
149
|
+
fails "String#downcase case folding case folds special characters" # ArgumentError: [String#downcase] wrong number of arguments(1 for 0)
|
150
|
+
fails "String#downcase full Unicode case mapping adapted for Lithuanian allows Turkic as an extra option (and applies Turkic semantics)" # ArgumentError: [String#downcase] wrong number of arguments(2 for 0)
|
151
|
+
fails "String#downcase full Unicode case mapping adapted for Lithuanian currently works the same as full Unicode case mapping" # ArgumentError: [String#downcase] wrong number of arguments(1 for 0)
|
152
|
+
fails "String#downcase full Unicode case mapping adapted for Turkic languages allows Lithuanian as an extra option" # ArgumentError: [String#downcase] wrong number of arguments(2 for 0)
|
153
|
+
fails "String#downcase full Unicode case mapping adapted for Turkic languages downcases characters according to Turkic semantics" # ArgumentError: [String#downcase] wrong number of arguments(1 for 0)
|
154
|
+
fails "String#downcase returns a String instance for subclasses" # Expected "foobar" (StringSpecs::MyString) to be an instance of String
|
155
|
+
fails "String#downcase! ASCII-only case mapping works for non-ascii-compatible encodings" # NotImplementedError: String#downcase! not supported. Mutable String methods are not supported in Opal.
|
156
|
+
fails "String#downcase! modifies self in place for non-ascii-compatible encodings" # NotImplementedError: String#downcase! not supported. Mutable String methods are not supported in Opal.
|
157
|
+
fails "String#dump does not take into account if a string is frozen" # NoMethodError: undefined method `dump' for "foo"
|
158
|
+
fails "String#dump includes .force_encoding(name) if the encoding isn't ASCII compatible" # NoMethodError: undefined method `dump' for "ࡶ"
|
159
|
+
fails "String#dump keeps origin encoding" # ArgumentError: unknown encoding name - ISO-8859-1
|
160
|
+
fails "String#dump returns a String instance" # NoMethodError: undefined method `dump' for ""
|
161
|
+
fails "String#dump returns a string with # not escaped when followed by any other character" # NoMethodError: undefined method `dump' for "#"
|
162
|
+
fails "String#dump returns a string with \" and \\ escaped with a backslash" # NoMethodError: undefined method `dump' for "\""
|
163
|
+
fails "String#dump returns a string with \\#<char> when # is followed by $, @, @@, {" # NoMethodError: undefined method `dump' for "\#$PATH"
|
164
|
+
fails "String#dump returns a string with \\#<char> when # is followed by $, @, {" # NoMethodError: undefined method `dump' for "\#$"
|
165
|
+
fails "String#dump returns a string with lower-case alpha characters unescaped" # NoMethodError: undefined method `dump' for "a"
|
166
|
+
fails "String#dump returns a string with multi-byte UTF-8 characters replaced by \\u{} notation with lower-case hex digits" # NoMethodError: undefined method `dump' for "\u0080"
|
167
|
+
fails "String#dump returns a string with multi-byte UTF-8 characters replaced by \\u{} notation with upper-case hex digits" # NoMethodError: undefined method `dump' for "\u0080"
|
168
|
+
fails "String#dump returns a string with non-printing ASCII characters replaced by \\x notation" # NoMethodError: undefined method `dump' for "\u0000"
|
169
|
+
fails "String#dump returns a string with non-printing single-byte UTF-8 characters replaced by \\x notation" # NoMethodError: undefined method `dump' for "\u0000"
|
170
|
+
fails "String#dump returns a string with numeric characters unescaped" # NoMethodError: undefined method `dump' for "0"
|
171
|
+
fails "String#dump returns a string with printable non-alphanumeric characters unescaped" # NoMethodError: undefined method `dump' for " "
|
172
|
+
fails "String#dump returns a string with special characters replaced with \\<char> notation" # NoMethodError: undefined method `dump' for "\a"
|
173
|
+
fails "String#dump returns a string with upper-case alpha characters unescaped" # NoMethodError: undefined method `dump' for "A"
|
174
|
+
fails "String#dump returns a subclass instance" # NoMethodError: undefined method `dump' for ""
|
175
|
+
fails "String#dump wraps string with \"" # NoMethodError: undefined method `dump' for "foo"
|
176
|
+
fails "String#dup calls #initialize_copy on the new instance" # Expected nil to equal "string"
|
177
|
+
fails "String#each_byte keeps iterating from the old position (to new string end) when self changes" # NotImplementedError: String#<< not supported. Mutable String methods are not supported in Opal.
|
178
|
+
fails "String#each_byte when no block is given returned enumerator size should return the bytesize of the string" # Expected nil to equal 10
|
179
|
+
fails "String#each_codepoint is synonymous with #bytes for Strings which are single-byte optimizable" # Expected [40, 41, 123, 125] to equal [40, 0, 41, 0, 123, 0, 125, 0]
|
180
|
+
fails "String#each_grapheme_cluster is unicode aware" # NoMethodError: undefined method `each_grapheme_cluster' for "Ç∂éƒg"
|
181
|
+
fails "String#each_grapheme_cluster passes each char in self to the given block" # NoMethodError: undefined method `each_grapheme_cluster' for "hello"
|
182
|
+
fails "String#each_grapheme_cluster passes each grapheme cluster in self to the given block" # NoMethodError: undefined method `each_grapheme_cluster' for "ab🏳️\u200D🌈🐾"
|
183
|
+
fails "String#each_grapheme_cluster returns a different character if the String is transcoded" # NoMethodError: undefined method `each_grapheme_cluster' for "€"
|
184
|
+
fails "String#each_grapheme_cluster returns characters in the same encoding as self" # ArgumentError: unknown encoding name - Shift_JIS
|
185
|
+
fails "String#each_grapheme_cluster returns self" # NoMethodError: undefined method `each_grapheme_cluster' for "ab🏳️\u200D🌈🐾"
|
186
|
+
fails "String#each_grapheme_cluster taints resulting strings when self is tainted" # NoMethodError: undefined method `each_grapheme_cluster' for "hello"
|
187
|
+
fails "String#each_grapheme_cluster uses the String's encoding to determine what characters it contains" # NoMethodError: undefined method `each_grapheme_cluster' for "𤭢"
|
188
|
+
fails "String#each_grapheme_cluster when no block is given returned enumerator size should return the size of the string" # NoMethodError: undefined method `each_grapheme_cluster' for "hello"
|
189
|
+
fails "String#each_grapheme_cluster when no block is given returns an enumerator" # NoMethodError: undefined method `each_grapheme_cluster' for "hello"
|
190
|
+
fails "String#each_grapheme_cluster works if the String's contents is invalid for its encoding" # Expected true to be false
|
191
|
+
fails "String#each_grapheme_cluster works with multibyte characters" # NoMethodError: undefined method `each_grapheme_cluster' for "覇"
|
192
|
+
fails "String#each_line when `chomp` keyword argument is passed ignores new line characters when separator is specified" # ArgumentError: [String#each_line] wrong number of arguments(2 for -1)
|
193
|
+
fails "String#each_line when `chomp` keyword argument is passed removes new line characters when separator is not specified" # TypeError: no implicit conversion of Hash into String
|
194
|
+
fails "String#each_line when `chomp` keyword argument is passed removes new line characters" # TypeError: no implicit conversion of Hash into String
|
195
|
+
fails "String#each_line when `chomp` keyword argument is passed removes only specified separator" # ArgumentError: [String#each_line] wrong number of arguments(2 for -1)
|
196
|
+
fails "String#each_line yields String instances for subclasses" # Expected [StringSpecs::MyString, StringSpecs::MyString] == [String, String] to be truthy but was false
|
197
|
+
fails "String#each_line yields paragraphs (broken by 2 or more successive newlines) when passed '' and replaces multiple newlines with only two ones" # Expected ["hello\nworld\n\n\n", "and\nuniverse\n\n\n\n\n"] to equal ["hello\nworld\n\n", "and\nuniverse\n\n"]
|
198
|
+
fails "String#encode when passed options replaces invalid encoding" # NoMethodError: undefined method `default_internal' for Encoding
|
199
|
+
fails "String#encode when passed to, from, options returns a copy in the destination encoding when both encodings are the same" # NoMethodError: undefined method `default_internal' for Encoding
|
200
|
+
fails "String#encoding for Strings with \\x escapes returns BINARY when an escape creates a byte with the 8th bit set if the source encoding is US-ASCII" # Expected #<Encoding:UTF-8> to equal #<Encoding:ASCII-8BIT (dummy)>
|
201
|
+
fails "String#end_with? raises an Encoding::CompatibilityError if the encodings are incompatible" # NameError: uninitialized constant Encoding::EUC_JP
|
202
|
+
fails "String#force_encoding with a special encoding name accepts valid special encoding names" # NoMethodError: undefined method `default_internal' for Encoding
|
203
|
+
fails "String#force_encoding with a special encoding name defaults to ASCII-8BIT if special encoding name is not set" # NoMethodError: undefined method `default_internal' for Encoding
|
204
|
+
fails "String#force_encoding with a special encoding name defaults to BINARY if special encoding name is not set" # NoMethodError: undefined method `default_internal' for Encoding
|
205
|
+
fails "String#getbyte interprets bytes relative to the String's encoding" # NotImplementedError: NotImplementedError
|
206
|
+
fails "String#getbyte returns an Integer between 0 and 255" # NotImplementedError: NotImplementedError
|
207
|
+
fails "String#grapheme_clusters is unicode aware" # NoMethodError: undefined method `grapheme_clusters' for "Ç∂éƒg"
|
208
|
+
fails "String#grapheme_clusters passes each char in self to the given block" # NoMethodError: undefined method `grapheme_clusters' for "hello"
|
209
|
+
fails "String#grapheme_clusters passes each grapheme cluster in self to the given block" # NoMethodError: undefined method `grapheme_clusters' for "ab🏳️\u200D🌈🐾"
|
210
|
+
fails "String#grapheme_clusters returns a different character if the String is transcoded" # NoMethodError: undefined method `grapheme_clusters' for "€"
|
211
|
+
fails "String#grapheme_clusters returns an array when no block given" # NoMethodError: undefined method `grapheme_clusters' for "ab🏳️\u200D🌈🐾"
|
212
|
+
fails "String#grapheme_clusters returns characters in the same encoding as self" # ArgumentError: unknown encoding name - Shift_JIS
|
213
|
+
fails "String#grapheme_clusters returns self" # NoMethodError: undefined method `grapheme_clusters' for "ab🏳️\u200D🌈🐾"
|
214
|
+
fails "String#grapheme_clusters taints resulting strings when self is tainted" # NoMethodError: undefined method `grapheme_clusters' for "hello"
|
215
|
+
fails "String#grapheme_clusters uses the String's encoding to determine what characters it contains" # NoMethodError: undefined method `grapheme_clusters' for "𤭢"
|
216
|
+
fails "String#grapheme_clusters works if the String's contents is invalid for its encoding" # Expected true to be false
|
217
|
+
fails "String#grapheme_clusters works with multibyte characters" # NoMethodError: undefined method `grapheme_clusters' for "覇"
|
218
|
+
fails "String#gsub with pattern and block does not set $~ for procs created from methods" # Expected "he<l><l>o" == "he<unset><unset>o" to be truthy but was false
|
219
|
+
fails "String#gsub with pattern and replacement returns String instances when called on a subclass" # Expected "" (StringSpecs::MyString) to be an instance of String
|
220
|
+
fails "String#include? with String raises an Encoding::CompatibilityError if the encodings are incompatible" # NameError: uninitialized constant Encoding::EUC_JP
|
221
|
+
fails "String#inspect uses \\x notation for broken UTF-8 sequences" # Expected "\"ð\\u009F\"" == "\"\\xF0\\x9F\"" to be truthy but was false
|
222
|
+
fails "String#inspect when the string's encoding is different than the result's encoding and the string's encoding is ASCII-compatible but the characters are non-ASCII returns a string with the non-ASCII characters replaced by \\x notation" # ArgumentError: unknown encoding name - EUC-JP
|
223
|
+
fails "String#intern raises an EncodingError for UTF-8 String containing invalid bytes" # Expected true to equal false
|
224
|
+
fails "String#intern returns a US-ASCII Symbol for a UTF-8 String containing only US-ASCII characters" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
|
225
|
+
fails "String#intern returns a US-ASCII Symbol for a binary String containing only US-ASCII characters" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
|
226
|
+
fails "String#intern returns a UTF-16LE Symbol for a UTF-16LE String containing non US-ASCII characters" # Error
|
227
|
+
fails "String#intern returns a binary Symbol for a binary String containing non US-ASCII characters" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
|
228
|
+
fails "String#length returns the correct length after force_encoding(BINARY)" # Expected 2 == 4 to be truthy but was false
|
229
|
+
fails "String#lines when `chomp` keyword argument is passed ignores new line characters when separator is specified" # ArgumentError: [String#lines] wrong number of arguments(2 for -1)
|
230
|
+
fails "String#lines when `chomp` keyword argument is passed removes new line characters when separator is not specified" # TypeError: no implicit conversion of Hash into String
|
231
|
+
fails "String#lines when `chomp` keyword argument is passed removes new line characters" # TypeError: no implicit conversion of Hash into String
|
232
|
+
fails "String#lines when `chomp` keyword argument is passed removes only specified separator" # ArgumentError: [String#lines] wrong number of arguments(2 for -1)
|
233
|
+
fails "String#lines yields String instances for subclasses" # Expected [StringSpecs::MyString, StringSpecs::MyString] == [String, String] to be truthy but was false
|
234
|
+
fails "String#lines yields paragraphs (broken by 2 or more successive newlines) when passed '' and replaces multiple newlines with only two ones" # Expected ["hello\nworld\n\n\n", "and\nuniverse\n\n\n\n\n"] to equal ["hello\nworld\n\n", "and\nuniverse\n\n"]
|
235
|
+
fails "String#ljust with length, padding returns String instances when called on subclasses" # Expected " " (StringSpecs::MyString) to be an instance of String
|
236
|
+
fails "String#next returns String instances when called on a subclass" # Expected "" (StringSpecs::MyString) to be an instance of String
|
237
|
+
fails "String#rjust with length, padding returns String instances when called on subclasses" # Expected " " (StringSpecs::MyString) to be an instance of String
|
238
|
+
fails "String#scan with pattern and block passes block arguments as individual arguments when blocks are provided" # Expected ["a", "b", "c"] to equal "a"
|
239
|
+
fails "String#size returns the correct length after force_encoding(BINARY)" # Expected 2 == 4 to be truthy but was false
|
240
|
+
fails "String#slice raises a RangeError if the index is too big" # Expected RangeError but no exception was raised (nil was returned)
|
241
|
+
fails "String#slice with Range raises a RangeError if one of the bound is too big" # Expected RangeError but no exception was raised (nil was returned)
|
242
|
+
fails "String#slice with Range raises a type error if a range is passed with a length" # Expected TypeError but no exception was raised ("el" was returned)
|
243
|
+
fails "String#slice with Range returns String instances" # Expected "" (StringSpecs::MyString) to be an instance of String
|
244
|
+
fails "String#slice with Range works with endless ranges" # Opal::SyntaxError: undefined method `type' for nil
|
245
|
+
fails "String#slice with Regexp returns String instances" # Expected "" (StringSpecs::MyString) to be an instance of String
|
246
|
+
fails "String#slice with Regexp, index returns String instances" # Expected "he" (StringSpecs::MyString) to be an instance of String
|
247
|
+
fails "String#slice with String returns a String instance when given a subclass instance" # Expected "el" (StringSpecs::MyString) to be an instance of String
|
248
|
+
fails "String#slice with index, length raises a RangeError if the index or length is too big" # Expected RangeError but no exception was raised (nil was returned)
|
249
|
+
fails "String#slice with index, length returns String instances" # Expected "" (StringSpecs::MyString) to be an instance of String
|
250
|
+
fails "String#slice with index, length returns a string with the same encoding" # ArgumentError: unknown encoding name - ISO-8859-1
|
251
|
+
fails "String#slice! Range returns String instances" # NotImplementedError: String#slice! not supported. Mutable String methods are not supported in Opal.
|
252
|
+
fails "String#slice! with Regexp returns String instances" # NotImplementedError: String#slice! not supported. Mutable String methods are not supported in Opal.
|
253
|
+
fails "String#slice! with Regexp, index returns String instances" # NotImplementedError: String#slice! not supported. Mutable String methods are not supported in Opal.
|
254
|
+
fails "String#slice! with index, length returns String instances" # NotImplementedError: String#slice! not supported. Mutable String methods are not supported in Opal.
|
255
|
+
fails "String#split with Regexp applies the limit to the number of split substrings, without counting captures" # Expected ["a", "aBa"] to equal ["a", "B", "", "", "aBa"]
|
256
|
+
fails "String#split with Regexp for a String subclass yields instances of String" # Expected nil (NilClass) to be an instance of String
|
257
|
+
fails "String#split with Regexp returns String instances based on self" # Expected "x" (StringSpecs::MyString) to be an instance of String
|
258
|
+
fails "String#split with Regexp when a block is given returns a string as is (and doesn't call block) if it is empty" # Expected [] == "" to be truthy but was false
|
259
|
+
fails "String#split with Regexp when a block is given yields each split letter" # Expected ["c", "h", "u", "n", "k", "y"] == "chunky" to be truthy but was false
|
260
|
+
fails "String#split with Regexp when a block is given yields each split substring with a pattern" # Expected ["chunky", "bacon"] == "chunky-bacon" to be truthy but was false
|
261
|
+
fails "String#split with Regexp when a block is given yields each split substring with a regexp pattern" # Expected ["chunky", "bacon"] == "chunky:bacon" to be truthy but was false
|
262
|
+
fails "String#split with Regexp when a block is given yields each split substring with default pattern" # Expected ["chunky", "bacon"] == "chunky bacon" to be truthy but was false
|
263
|
+
fails "String#split with Regexp when a block is given yields each split substring with empty regexp pattern and limit" # Expected ["c", "h", "unky"] == "chunky" to be truthy but was false
|
264
|
+
fails "String#split with Regexp when a block is given yields each split substring with empty regexp pattern" # Expected ["c", "h", "u", "n", "k", "y"] == "chunky" to be truthy but was false
|
265
|
+
fails "String#split with Regexp when a block is given yields the string when limit is 1" # Expected ["chunky bacon"] == "chunky bacon" to be truthy but was false
|
266
|
+
fails "String#split with String returns String instances based on self" # Expected "x" (StringSpecs::MyString) to be an instance of String
|
267
|
+
fails "String#squeeze returns String instances when called on a subclass" # Expected "oh no!" (StringSpecs::MyString) to be an instance of String
|
268
|
+
fails "String#start_with? sets Regexp.last_match if it returns true" # TypeError: no implicit conversion of Regexp into String
|
269
|
+
fails "String#start_with? supports regexps with ^ and $ modifiers" # TypeError: no implicit conversion of Regexp into String
|
270
|
+
fails "String#start_with? supports regexps" # TypeError: no implicit conversion of Regexp into String
|
271
|
+
fails "String#sub with pattern, replacement returns String instances when called on a subclass" # Expected "" (StringSpecs::MyString) to be an instance of String
|
272
|
+
fails "String#sub with pattern, replacement returns a copy of self when no modification is made" # Expected "hello" not to be identical to "hello"
|
273
|
+
fails "String#succ returns String instances when called on a subclass" # Expected "" (StringSpecs::MyString) to be an instance of String
|
274
|
+
fails "String#swapcase ASCII-only case mapping does not swapcase non-ASCII characters" # ArgumentError: [String#swapcase] wrong number of arguments(1 for 0)
|
275
|
+
fails "String#swapcase full Unicode case mapping adapted for Lithuanian allows Turkic as an extra option (and applies Turkic semantics)" # ArgumentError: [String#swapcase] wrong number of arguments(2 for 0)
|
276
|
+
fails "String#swapcase full Unicode case mapping adapted for Lithuanian currently works the same as full Unicode case mapping" # ArgumentError: [String#swapcase] wrong number of arguments(1 for 0)
|
277
|
+
fails "String#swapcase full Unicode case mapping adapted for Turkic languages allows Lithuanian as an extra option" # ArgumentError: [String#swapcase] wrong number of arguments(2 for 0)
|
278
|
+
fails "String#swapcase full Unicode case mapping adapted for Turkic languages swaps case of ASCII characters according to Turkic semantics" # ArgumentError: [String#swapcase] wrong number of arguments(1 for 0)
|
279
|
+
fails "String#swapcase full Unicode case mapping updates string metadata" # Expected "aßET" to equal "aSSET"
|
280
|
+
fails "String#swapcase full Unicode case mapping works for all of Unicode with no option" # Expected "äÖü" to equal "ÄöÜ"
|
281
|
+
fails "String#swapcase returns String instances when called on a subclass" # Expected "" (StringSpecs::MyString) to be an instance of String
|
282
|
+
fails "String#swapcase works for all of Unicode" # Expected "äÖü" to equal "ÄöÜ"
|
283
|
+
fails "String#swapcase! full Unicode case mapping works for non-ascii-compatible encodings" # NotImplementedError: String#swapcase! not supported. Mutable String methods are not supported in Opal.
|
284
|
+
fails "String#swapcase! modifies self in place for ASCII-only case mapping works for non-ascii-compatible encodings" # NotImplementedError: String#swapcase! not supported. Mutable String methods are not supported in Opal.
|
285
|
+
fails "String#swapcase! modifies self in place for non-ascii-compatible encodings" # NotImplementedError: String#swapcase! not supported. Mutable String methods are not supported in Opal.
|
286
|
+
fails "String#to_sym raises an EncodingError for UTF-8 String containing invalid bytes" # Expected true to equal false
|
287
|
+
fails "String#to_sym returns a US-ASCII Symbol for a UTF-8 String containing only US-ASCII characters" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
|
288
|
+
fails "String#to_sym returns a US-ASCII Symbol for a binary String containing only US-ASCII characters" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
|
289
|
+
fails "String#to_sym returns a UTF-16LE Symbol for a UTF-16LE String containing non US-ASCII characters" # ERROR
|
290
|
+
fails "String#to_sym returns a binary Symbol for a binary String containing non US-ASCII characters" # Expected #<Encoding:UTF-16LE> to equal #<Encoding:ASCII-8BIT (dummy)>
|
291
|
+
fails "String#tr returns Stringinstances when called on a subclass" # Expected "hallo" (StringSpecs::MyString) to be an instance of String
|
292
|
+
fails "String#tr_s returns String instances when called on a subclass" # Expected "hallo" (StringSpecs::MyString) to be an instance of String
|
293
|
+
fails "String#undump Limitations cannot undump non ASCII-compatible string" # NoMethodError: undefined method `undump' for "\"foo\""
|
294
|
+
fails "String#undump always returns String instance" # NoMethodError: undefined method `undump' for "\"foo\""
|
295
|
+
fails "String#undump does not take into account if a string is frozen" # NoMethodError: undefined method `undump' for "\"foo\""
|
296
|
+
fails "String#undump invalid dump raises RuntimeError exception if wrapping \" are missing" # NoMethodError: undefined method `undump' for "foo"
|
297
|
+
fails "String#undump invalid dump raises RuntimeError if string contains \u0000 character" # NoMethodError: undefined method `undump' for "\"foo\u0000\""
|
298
|
+
fails "String#undump invalid dump raises RuntimeError if string contains non ASCII character" # NoMethodError: undefined method `undump' for "\"あ\""
|
299
|
+
fails "String#undump invalid dump raises RuntimeError if there are some excessive \"" # NoMethodError: undefined method `undump' for "\" \"\" \""
|
300
|
+
fails "String#undump invalid dump raises RuntimeError if there is incorrect \\x sequence" # NoMethodError: undefined method `undump' for "\"\\x\""
|
301
|
+
fails "String#undump invalid dump raises RuntimeError if there is malformed dump of non ASCII-compatible string" # NoMethodError: undefined method `undump' for "\"\".force_encoding(\"ASCII-8BIT\""
|
302
|
+
fails "String#undump invalid dump raises RuntimeError in there is incorrect \\u sequence" # NoMethodError: undefined method `undump' for "\"\\u\""
|
303
|
+
fails "String#undump keeps origin encoding" # ArgumentError: unknown encoding name - ISO-8859-1
|
304
|
+
fails "String#undump returns a string with # not escaped when followed by any other character" # NoMethodError: undefined method `undump' for "\"#\""
|
305
|
+
fails "String#undump returns a string with \\uXXXX notation replaced with multi-byte UTF-8 characters" # NoMethodError: undefined method `undump' for "\"\\u0080\""
|
306
|
+
fails "String#undump returns a string with \\u{} notation replaced with multi-byte UTF-8 characters" # NoMethodError: undefined method `undump' for "\"\\u80\""
|
307
|
+
fails "String#undump returns a string with \\x notation replaced with non-printing ASCII character" # NoMethodError: undefined method `undump' for "\"\\x00\""
|
308
|
+
fails "String#undump returns a string with lower-case alpha characters unescaped" # NoMethodError: undefined method `undump' for "\"a\""
|
309
|
+
fails "String#undump returns a string with numeric characters unescaped" # NoMethodError: undefined method `undump' for "\"0\""
|
310
|
+
fails "String#undump returns a string with printable non-alphanumeric characters" # NoMethodError: undefined method `undump' for "\" \""
|
311
|
+
fails "String#undump returns a string with special characters in \\<char> notation replaced with the characters" # NoMethodError: undefined method `undump' for "\"\\a\""
|
312
|
+
fails "String#undump returns a string with unescaped sequences \" and \\" # NoMethodError: undefined method `undump' for "\"\\\"\""
|
313
|
+
fails "String#undump returns a string with unescaped sequences \\#<char> when # is followed by $, @, {" # NoMethodError: undefined method `undump' for "\"\\\#$PATH\""
|
314
|
+
fails "String#undump returns a string with unescaped sequencies \" and \\" # NoMethodError: undefined method `undump' for "\"\\\"\""
|
315
|
+
fails "String#undump returns a string with upper-case alpha characters unescaped" # NoMethodError: undefined method `undump' for "\"A\""
|
316
|
+
fails "String#undump strips outer \"" # NoMethodError: undefined method `undump' for "\"foo\""
|
317
|
+
fails "String#undump taints the result if self is tainted" # NoMethodError: undefined method `undump' for "\"foo\""
|
318
|
+
fails "String#undump undumps correctly string produced from non ASCII-compatible one" # NoMethodError: undefined method `dump' for "ࡶ"
|
319
|
+
fails "String#undump untrusts the result if self is untrusted" # NoMethodError: undefined method `untrust' for "\"foo\""
|
320
|
+
fails "String#unicode_normalize raises an Encoding::CompatibilityError if string is not in an unicode encoding" # ArgumentError: unknown encoding name - ISO-8859-1
|
321
|
+
fails "String#unicode_normalized? raises an Encoding::CompatibilityError if the string is not in an unicode encoding" # ArgumentError: unknown encoding name - ISO-8859-1
|
322
|
+
fails "String#unicode_normalized? returns true if str is in Unicode normalization form (nfc)" # Expected true to be false
|
323
|
+
fails "String#unicode_normalized? returns true if str is in Unicode normalization form (nfd)" # Expected true to be false
|
324
|
+
fails "String#unicode_normalized? returns true if str is in Unicode normalization form (nfkc)" # Expected true to be false
|
325
|
+
fails "String#unicode_normalized? returns true if str is in Unicode normalization form (nfkd)" # Expected true to be false
|
326
|
+
fails "String#unpack with format 'm' when given count 0 raises an ArgumentError for an invalid base64 character" # Expected ArgumentError but no exception was raised (["test"] was returned)
|
327
|
+
fails "String#unpack1 returns the first value of #unpack" # RuntimeError: Unsupported unpack directive "x" (no chunk reader defined)
|
328
|
+
fails "String#upcase ASCII-only case mapping does not upcase non-ASCII characters" # ArgumentError: [String#upcase] wrong number of arguments(1 for 0)
|
329
|
+
fails "String#upcase full Unicode case mapping adapted for Lithuanian allows Turkic as an extra option (and applies Turkic semantics)" # ArgumentError: [String#upcase] wrong number of arguments(2 for 0)
|
330
|
+
fails "String#upcase full Unicode case mapping adapted for Lithuanian currently works the same as full Unicode case mapping" # ArgumentError: [String#upcase] wrong number of arguments(1 for 0)
|
331
|
+
fails "String#upcase full Unicode case mapping adapted for Turkic languages allows Lithuanian as an extra option" # ArgumentError: [String#upcase] wrong number of arguments(2 for 0)
|
332
|
+
fails "String#upcase full Unicode case mapping adapted for Turkic languages upcases ASCII characters according to Turkic semantics" # ArgumentError: [String#upcase] wrong number of arguments(1 for 0)
|
333
|
+
fails "String#upcase returns a String instance for subclasses" # Expected "FOOBAR" (StringSpecs::MyString) to be an instance of String
|
334
|
+
fails "String#upcase! full Unicode case mapping works for non-ascii-compatible encodings" # NotImplementedError: String#upcase! not supported. Mutable String methods are not supported in Opal.
|
335
|
+
fails "String#upcase! modifies self in place for ASCII-only case mapping works for non-ascii-compatible encodings" # NotImplementedError: String#upcase! not supported. Mutable String methods are not supported in Opal.
|
336
|
+
fails "String#upcase! modifies self in place for non-ascii-compatible encodings" # NotImplementedError: String#upcase! not supported. Mutable String methods are not supported in Opal.
|
337
|
+
fails "String#valid_encoding? returns true for IBM720 encoding self is valid in" # ArgumentError: unknown encoding name - IBM720
|
338
|
+
fails "String.new accepts a capacity argument" # ArgumentError: [String.new] wrong number of arguments(2 for -1)
|
339
|
+
fails "String.new accepts an encoding argument" # ArgumentError: [String.new] wrong number of arguments(2 for -1)
|
340
|
+
fails "String.new is called on subclasses" # Expected nil to equal "subclass"
|
341
|
+
end
|