opal 1.6.1 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +17 -0
- data/CHANGELOG.md +35 -1
- data/Gemfile +1 -0
- data/HACKING.md +47 -26
- data/benchmark/benchmarks +415 -103
- data/benchmark/bm_call_overhead.yml +28 -0
- data/benchmark/run.rb +61 -40
- data/docs/cdp_common.json +3364 -0
- data/docs/cdp_common.md +18 -0
- data/docs/{headless_chrome.md → headless_browsers.md} +31 -12
- data/lib/opal/ast/builder.rb +1 -1
- data/lib/opal/builder.rb +6 -1
- data/lib/opal/builder_processors.rb +5 -3
- data/lib/opal/cache.rb +1 -7
- data/lib/opal/cli_options.rb +72 -58
- data/lib/opal/cli_runners/chrome.rb +47 -9
- data/lib/opal/cli_runners/chrome_cdp_interface.rb +238 -112
- data/lib/opal/cli_runners/compiler.rb +146 -13
- data/lib/opal/cli_runners/deno.rb +32 -0
- data/lib/opal/cli_runners/firefox.rb +350 -0
- data/lib/opal/cli_runners/firefox_cdp_interface.rb +212 -0
- data/lib/opal/cli_runners/node_modules/.bin/chrome-remote-interface.cmd +17 -0
- data/lib/opal/cli_runners/node_modules/.bin/chrome-remote-interface.ps1 +28 -0
- data/lib/opal/cli_runners/node_modules/.package-lock.json +41 -0
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/LICENSE +1 -1
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/README.md +322 -182
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/bin/client.js +99 -114
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/chrome-remote-interface.js +1 -11
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/index.js +16 -11
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/api.js +41 -33
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/chrome.js +224 -214
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/devtools.js +71 -191
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/external-request.js +26 -6
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/protocol.json +20788 -9049
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/websocket-wrapper.js +10 -3
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/package.json +59 -123
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/webpack.config.js +25 -32
- data/lib/opal/cli_runners/node_modules/commander/History.md +298 -0
- data/lib/opal/cli_runners/node_modules/commander/LICENSE +22 -0
- data/lib/opal/cli_runners/node_modules/commander/Readme.md +217 -61
- data/lib/opal/cli_runners/node_modules/commander/index.js +431 -145
- data/lib/opal/cli_runners/node_modules/commander/package.json +16 -79
- data/lib/opal/cli_runners/node_modules/ws/README.md +334 -98
- data/lib/opal/cli_runners/node_modules/ws/browser.js +8 -0
- data/lib/opal/cli_runners/node_modules/ws/index.js +5 -10
- data/lib/opal/cli_runners/node_modules/ws/lib/buffer-util.js +129 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/constants.js +10 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/event-target.js +184 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/extension.js +223 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/limiter.js +55 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/permessage-deflate.js +518 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/receiver.js +607 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/sender.js +409 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/stream.js +180 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/validation.js +104 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/websocket-server.js +447 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/websocket.js +1195 -0
- data/lib/opal/cli_runners/node_modules/ws/package.json +40 -106
- data/lib/opal/cli_runners/package-lock.json +62 -0
- data/lib/opal/cli_runners/package.json +1 -1
- data/lib/opal/cli_runners.rb +26 -4
- data/lib/opal/nodes/args/prepare_post_args.rb +2 -2
- data/lib/opal/nodes/def.rb +8 -8
- data/lib/opal/nodes/iter.rb +12 -12
- data/lib/opal/nodes/logic.rb +1 -1
- data/lib/opal/nodes/masgn.rb +2 -2
- data/lib/opal/parser/with_ruby_lexer.rb +1 -1
- data/lib/opal/paths.rb +14 -0
- data/lib/opal/rewriter.rb +2 -0
- data/lib/opal/rewriters/forward_args.rb +52 -4
- data/lib/opal/rewriters/targeted_patches.rb +94 -0
- data/lib/opal/version.rb +1 -1
- data/opal/corelib/basic_object.rb +1 -1
- data/opal/corelib/boolean.rb +2 -2
- data/opal/corelib/class.rb +11 -0
- data/opal/corelib/constants.rb +3 -3
- data/opal/corelib/enumerable.rb +4 -0
- data/opal/corelib/enumerator.rb +1 -1
- data/opal/corelib/hash.rb +2 -2
- data/opal/corelib/helpers.rb +1 -1
- data/opal/corelib/kernel.rb +3 -3
- data/opal/corelib/method.rb +1 -1
- data/opal/corelib/module.rb +29 -8
- data/opal/corelib/proc.rb +7 -5
- data/opal/corelib/runtime.js +141 -78
- data/opal/corelib/set.rb +252 -0
- data/opal/corelib/string.rb +2 -1
- data/opal/corelib/time.rb +2 -2
- data/opal/opal.rb +1 -0
- data/opal.gemspec +1 -0
- data/spec/filters/bugs/array.rb +22 -13
- data/spec/filters/bugs/base64.rb +5 -5
- data/spec/filters/bugs/basicobject.rb +16 -8
- data/spec/filters/bugs/bigdecimal.rb +161 -160
- data/spec/filters/bugs/binding.rb +10 -10
- data/spec/filters/bugs/class.rb +8 -8
- data/spec/filters/bugs/complex.rb +2 -1
- data/spec/filters/bugs/date.rb +79 -81
- data/spec/filters/bugs/datetime.rb +29 -29
- data/spec/filters/bugs/delegate.rb +1 -3
- data/spec/filters/bugs/encoding.rb +69 -69
- data/spec/filters/bugs/enumerable.rb +22 -20
- data/spec/filters/bugs/enumerator.rb +88 -85
- data/spec/filters/bugs/exception.rb +46 -40
- data/spec/filters/bugs/file.rb +32 -32
- data/spec/filters/bugs/float.rb +26 -21
- data/spec/filters/bugs/freeze.rb +88 -0
- data/spec/filters/bugs/hash.rb +39 -38
- data/spec/filters/bugs/integer.rb +57 -44
- data/spec/filters/bugs/io.rb +1 -1
- data/spec/filters/bugs/kernel.rb +349 -269
- data/spec/filters/bugs/language.rb +220 -188
- data/spec/filters/bugs/main.rb +5 -3
- data/spec/filters/bugs/marshal.rb +38 -38
- data/spec/filters/bugs/math.rb +2 -1
- data/spec/filters/bugs/method.rb +73 -62
- data/spec/filters/bugs/module.rb +163 -143
- data/spec/filters/bugs/numeric.rb +6 -6
- data/spec/filters/bugs/objectspace.rb +16 -16
- data/spec/filters/bugs/openstruct.rb +1 -1
- data/spec/filters/bugs/pack_unpack.rb +51 -51
- data/spec/filters/bugs/pathname.rb +7 -7
- data/spec/filters/bugs/proc.rb +63 -63
- data/spec/filters/bugs/random.rb +7 -6
- data/spec/filters/bugs/range.rb +12 -9
- data/spec/filters/bugs/rational.rb +8 -7
- data/spec/filters/bugs/regexp.rb +49 -48
- data/spec/filters/bugs/ruby-32.rb +56 -0
- data/spec/filters/bugs/set.rb +30 -30
- data/spec/filters/bugs/singleton.rb +4 -4
- data/spec/filters/bugs/string.rb +187 -99
- data/spec/filters/bugs/stringio.rb +7 -0
- data/spec/filters/bugs/stringscanner.rb +68 -68
- data/spec/filters/bugs/struct.rb +11 -9
- data/spec/filters/bugs/symbol.rb +1 -1
- data/spec/filters/bugs/time.rb +78 -63
- data/spec/filters/bugs/trace_point.rb +4 -4
- data/spec/filters/bugs/unboundmethod.rb +32 -17
- data/spec/filters/bugs/warnings.rb +8 -12
- data/spec/filters/unsupported/array.rb +24 -107
- data/spec/filters/unsupported/basicobject.rb +12 -12
- data/spec/filters/unsupported/bignum.rb +27 -52
- data/spec/filters/unsupported/class.rb +1 -2
- data/spec/filters/unsupported/delegator.rb +3 -3
- data/spec/filters/unsupported/enumerable.rb +2 -9
- data/spec/filters/unsupported/enumerator.rb +2 -11
- data/spec/filters/unsupported/file.rb +1 -1
- data/spec/filters/unsupported/float.rb +28 -47
- data/spec/filters/unsupported/hash.rb +8 -14
- data/spec/filters/unsupported/integer.rb +75 -91
- data/spec/filters/unsupported/kernel.rb +17 -35
- data/spec/filters/unsupported/language.rb +11 -19
- data/spec/filters/unsupported/marshal.rb +22 -41
- data/spec/filters/unsupported/matchdata.rb +28 -52
- data/spec/filters/unsupported/math.rb +1 -1
- data/spec/filters/unsupported/privacy.rb +229 -285
- data/spec/filters/unsupported/range.rb +1 -5
- data/spec/filters/unsupported/regexp.rb +40 -66
- data/spec/filters/unsupported/set.rb +2 -2
- data/spec/filters/unsupported/singleton.rb +4 -4
- data/spec/filters/unsupported/string.rb +305 -508
- data/spec/filters/unsupported/struct.rb +3 -4
- data/spec/filters/unsupported/symbol.rb +15 -18
- data/spec/filters/unsupported/thread.rb +1 -7
- data/spec/filters/unsupported/time.rb +159 -202
- data/spec/filters/unsupported/usage_of_files.rb +170 -259
- data/spec/lib/builder_spec.rb +4 -4
- data/spec/lib/rewriters/forward_args_spec.rb +32 -12
- data/spec/mspec-opal/runner.rb +2 -0
- data/spec/ruby_specs +4 -0
- data/stdlib/deno/base.rb +28 -0
- data/stdlib/deno/file.rb +340 -0
- data/stdlib/{headless_chrome.rb → headless_browser/base.rb} +1 -1
- data/stdlib/headless_browser/file.rb +15 -0
- data/stdlib/headless_browser.rb +4 -0
- data/stdlib/native.rb +1 -1
- data/stdlib/nodejs/file.rb +5 -0
- data/stdlib/opal/platform.rb +8 -6
- data/stdlib/opal-platform.rb +14 -8
- data/stdlib/set.rb +1 -258
- data/tasks/benchmarking.rake +62 -19
- data/tasks/performance.rake +1 -1
- data/tasks/testing.rake +5 -3
- data/test/nodejs/test_file.rb +29 -10
- data/test/opal/http_server.rb +28 -11
- data/test/opal/unsupported_and_bugs.rb +2 -1
- metadata +89 -50
- data/lib/opal/cli_runners/node_modules/ultron/LICENSE +0 -22
- data/lib/opal/cli_runners/node_modules/ultron/index.js +0 -138
- data/lib/opal/cli_runners/node_modules/ultron/package.json +0 -112
- data/lib/opal/cli_runners/node_modules/ws/SECURITY.md +0 -33
- data/lib/opal/cli_runners/node_modules/ws/lib/BufferUtil.fallback.js +0 -56
- data/lib/opal/cli_runners/node_modules/ws/lib/BufferUtil.js +0 -15
- data/lib/opal/cli_runners/node_modules/ws/lib/ErrorCodes.js +0 -28
- data/lib/opal/cli_runners/node_modules/ws/lib/EventTarget.js +0 -158
- data/lib/opal/cli_runners/node_modules/ws/lib/Extensions.js +0 -69
- data/lib/opal/cli_runners/node_modules/ws/lib/PerMessageDeflate.js +0 -339
- data/lib/opal/cli_runners/node_modules/ws/lib/Receiver.js +0 -520
- data/lib/opal/cli_runners/node_modules/ws/lib/Sender.js +0 -438
- data/lib/opal/cli_runners/node_modules/ws/lib/Validation.fallback.js +0 -9
- data/lib/opal/cli_runners/node_modules/ws/lib/Validation.js +0 -17
- data/lib/opal/cli_runners/node_modules/ws/lib/WebSocket.js +0 -705
- data/lib/opal/cli_runners/node_modules/ws/lib/WebSocketServer.js +0 -336
- data/spec/filters/bugs/boolean.rb +0 -3
- data/spec/filters/bugs/matrix.rb +0 -3
- data/spec/filters/unsupported/fixnum.rb +0 -15
- data/spec/filters/unsupported/freeze.rb +0 -102
- data/spec/filters/unsupported/pathname.rb +0 -4
- data/spec/filters/unsupported/proc.rb +0 -4
- data/spec/filters/unsupported/random.rb +0 -5
- data/spec/filters/unsupported/taint.rb +0 -162
data/spec/filters/bugs/string.rb
CHANGED
@@ -1,117 +1,146 @@
|
|
1
1
|
# NOTE: run bin/format-filters after changing this file
|
2
2
|
opal_filter "String" do
|
3
|
-
fails "
|
3
|
+
fails "String#% %c raises error when a codepoint isn't representable in an encoding of a format string" # Expected RangeError (/out of char range/) but no exception was raised ("Ԇ" was returned)
|
4
|
+
fails "String#% %c uses the encoding of the format string to interpret codepoints" # ArgumentError: unknown encoding name - euc-jp
|
4
5
|
fails "String#% can produce a string with invalid encoding" # Expected true to be false
|
5
|
-
fails "String#% flags # applies to format o does nothing for negative argument" # Expected "0..7651"
|
6
|
-
fails "String#% flags # applies to formats aAeEfgG changes format from dd.dddd to exponential form for gG" # Expected "1.234e+02"
|
6
|
+
fails "String#% flags # applies to format o does nothing for negative argument" # Expected "0..7651" == "..7651" to be truthy but was false
|
7
|
+
fails "String#% flags # applies to formats aAeEfgG changes format from dd.dddd to exponential form for gG" # Expected "1.234e+02" == "1.e+02" to be truthy but was false
|
7
8
|
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
|
8
9
|
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
|
9
|
-
fails "String#% flags * left-justifies the result if specified with $ argument is negative" # Expected "1.095200e+2 "
|
10
|
-
fails "String#% flags * left-justifies the result if width is negative" # Expected "1.095200e+2 "
|
10
|
+
fails "String#% flags * left-justifies the result if specified with $ argument is negative" # Expected "1.095200e+2 " == "1.095200e+02 " to be truthy but was false
|
11
|
+
fails "String#% flags * left-justifies the result if width is negative" # Expected "1.095200e+2 " == "1.095200e+02 " to be truthy but was false
|
11
12
|
fails "String#% flags * raises ArgumentError when is mixed with width" # Expected ArgumentError but no exception was raised (" 112" was returned)
|
12
|
-
fails "String#% flags * uses the previous argument as the field width" # Expected " 1.095200e+02"
|
13
|
-
fails "String#% flags * uses the specified argument as the width if * is followed by a number and $" # Expected " 1.095200e+02"
|
13
|
+
fails "String#% flags * uses the previous argument as the field width" # Expected " 1.095200e+02" == " 1.095200e+02" to be truthy but was false
|
14
|
+
fails "String#% flags * uses the specified argument as the width if * is followed by a number and $" # Expected " 1.095200e+02" == " 1.095200e+02" to be truthy but was false
|
14
15
|
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
|
15
|
-
fails "String#% flags - left-justifies the result of conversion if width is specified" # Expected "1.095200e+2 "
|
16
|
-
fails "String#% flags 0 (zero) applies to numeric formats bBdiouxXaAeEfgG and width is specified pads with zeros, not spaces" # Expected "0000000001.095200e+02"
|
16
|
+
fails "String#% flags - left-justifies the result of conversion if width is specified" # Expected "1.095200e+2 " == "1.095200e+02 " to be truthy but was false
|
17
|
+
fails "String#% flags 0 (zero) applies to numeric formats bBdiouxXaAeEfgG and width is specified pads with zeros, not spaces" # Expected "0000000001.095200e+02" == "000000001.095200e+02" to be truthy but was false
|
17
18
|
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
|
18
19
|
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
|
19
20
|
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
|
20
21
|
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
|
21
22
|
fails "String#% float formats A displays Float::INFINITY as Inf" # NotImplementedError: `A` and `a` format field types are not implemented in Opal yet
|
22
23
|
fails "String#% float formats A displays Float::NAN as NaN" # NotImplementedError: `A` and `a` format field types are not implemented in Opal yet
|
23
|
-
fails "String#% float formats G otherwise cuts excessive digits in fractional part and keeps only 4 ones" # Expected "12.12341111"
|
24
|
-
fails "String#% float formats G otherwise cuts fraction part to have only 6 digits at all" # Expected "1.1234567"
|
25
|
-
fails "String#% float formats G otherwise rounds the last significant digit to the closest one in fractional part" # Expected "1.555555555"
|
26
|
-
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"
|
24
|
+
fails "String#% float formats G otherwise cuts excessive digits in fractional part and keeps only 4 ones" # Expected "12.12341111" == "12.1234" to be truthy but was false
|
25
|
+
fails "String#% float formats G otherwise cuts fraction part to have only 6 digits at all" # Expected "1.1234567" == "1.12346" to be truthy but was false
|
26
|
+
fails "String#% float formats G otherwise rounds the last significant digit to the closest one in fractional part" # Expected "1.555555555" == "1.55556" to be truthy but was false
|
27
|
+
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" == "1.23457E+06" to be truthy but was false
|
27
28
|
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
|
28
29
|
fails "String#% float formats a displays Float::INFINITY as Inf" # NotImplementedError: `A` and `a` format field types are not implemented in Opal yet
|
29
30
|
fails "String#% float formats a displays Float::NAN as NaN" # NotImplementedError: `A` and `a` format field types are not implemented in Opal yet
|
30
|
-
fails "String#% float formats g otherwise cuts excessive digits in fractional part and keeps only 4 ones" # Expected "12.12341111"
|
31
|
-
fails "String#% float formats g otherwise cuts fraction part to have only 6 digits at all" # Expected "1.1234567"
|
32
|
-
fails "String#% float formats g otherwise rounds the last significant digit to the closest one in fractional part" # Expected "1.555555555"
|
33
|
-
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"
|
34
|
-
fails "String#% integer formats d works well with large numbers" # Expected "1234567890987654400"
|
35
|
-
fails "String#% integer formats i works well with large numbers" # Expected "1234567890987654400"
|
36
|
-
fails "String#% integer formats u works well with large numbers" # Expected "1234567890987654400"
|
31
|
+
fails "String#% float formats g otherwise cuts excessive digits in fractional part and keeps only 4 ones" # Expected "12.12341111" == "12.1234" to be truthy but was false
|
32
|
+
fails "String#% float formats g otherwise cuts fraction part to have only 6 digits at all" # Expected "1.1234567" == "1.12346" to be truthy but was false
|
33
|
+
fails "String#% float formats g otherwise rounds the last significant digit to the closest one in fractional part" # Expected "1.555555555" == "1.55556" to be truthy but was false
|
34
|
+
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" == "1.23457e+06" to be truthy but was false
|
35
|
+
fails "String#% integer formats d works well with large numbers" # Expected "1234567890987654400" == "1234567890987654321" to be truthy but was false
|
36
|
+
fails "String#% integer formats i works well with large numbers" # Expected "1234567890987654400" == "1234567890987654321" to be truthy but was false
|
37
|
+
fails "String#% integer formats u works well with large numbers" # Expected "1234567890987654400" == "1234567890987654321" to be truthy but was false
|
37
38
|
fails "String#% other formats % alone raises an ArgumentError" # Expected ArgumentError but no exception was raised ("%" was returned)
|
39
|
+
fails "String#% other formats c raises TypeError if argument is nil" # Expected TypeError (/no implicit conversion from nil to integer/) but got: TypeError (no implicit conversion of NilClass into Integer)
|
40
|
+
fails "String#% other formats c raises TypeError if argument is not String or Integer and cannot be converted to them" # Expected TypeError (/no implicit conversion of Array into Integer/) but got: ArgumentError (too few arguments)
|
41
|
+
fails "String#% other formats c raises TypeError if converting to Integer with to_int returns non-Integer" # Expected TypeError (/can't convert BasicObject to String/) but got: NoMethodError (undefined method `respond_to?' for #<BasicObject:0x7300>)
|
42
|
+
fails "String#% other formats c raises TypeError if converting to String with to_str returns non-String" # Expected TypeError (/can't convert BasicObject to String/) but got: NoMethodError (undefined method `respond_to?' for #<BasicObject:0x7328>)
|
43
|
+
fails "String#% other formats c tries to convert argument to Integer with to_int" # NoMethodError: undefined method `respond_to?' for #<BasicObject:0x7324>
|
44
|
+
fails "String#% other formats c tries to convert argument to String with to_str" # NoMethodError: undefined method `respond_to?' for #<BasicObject:0x7318>
|
38
45
|
fails "String#% other formats s preserves encoding of the format string" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
39
46
|
fails "String#% output's encoding is the same as the format string if passed value is encoding-compatible" # NameError: uninitialized constant Encoding::SHIFT_JIS
|
40
|
-
fails "String#% output's encoding raises if a compatible encoding can't be found" # Expected
|
47
|
+
fails "String#% output's encoding raises if a compatible encoding can't be found" # Expected CompatibilityError but no exception was raised ("hello world" was returned)
|
41
48
|
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
|
42
|
-
fails "String#% precision float types does not affect G format" # Expected "12.12340000"
|
43
|
-
fails "String#% precision string formats determines the maximum number of characters to be copied from the string" # Expected "1"
|
44
|
-
fails "String#% raises Encoding::CompatibilityError if both encodings are ASCII compatible and there
|
49
|
+
fails "String#% precision float types does not affect G format" # Expected "12.12340000" == "12.1234" to be truthy but was false
|
50
|
+
fails "String#% precision string formats determines the maximum number of characters to be copied from the string" # Expected "1" == "[" to be truthy but was false
|
51
|
+
fails "String#% raises Encoding::CompatibilityError if both encodings are ASCII compatible and there are not ASCII characters" # ArgumentError: unknown encoding name - windows-1252
|
45
52
|
fails "String#% raises an error if single % appears at the end" # Expected ArgumentError but no exception was raised ("%" was returned)
|
46
53
|
fails "String#% returns a String in the same encoding as the format String if compatible" # NameError: uninitialized constant Encoding::KOI8_U
|
47
|
-
fails "String#% supports inspect formats using %p" # Expected "{\"capture\"=>1}"
|
48
|
-
fails "String#% width specifies the minimum number of characters that will be written to the result" # Expected " 1.095200e+02"
|
54
|
+
fails "String#% supports inspect formats using %p" # Expected "{\"capture\"=>1}" == "{:capture=>1}" to be truthy but was false
|
55
|
+
fails "String#% width specifies the minimum number of characters that will be written to the result" # Expected " 1.095200e+02" == " 1.095200e+02" to be truthy but was false
|
49
56
|
fails "String#* raises a RangeError when given integer is a Bignum" # Expected RangeError but no exception was raised ("" was returned)
|
50
|
-
fails "String#+ when self and the argument are in different ASCII-compatible encodings raises Encoding::CompatibilityError if neither are ASCII-only" # Expected
|
57
|
+
fails "String#+ when self and the argument are in different ASCII-compatible encodings raises Encoding::CompatibilityError if neither are ASCII-only" # Expected CompatibilityError but no exception was raised ("éé" was returned)
|
51
58
|
fails "String#+ when self and the argument are in different ASCII-compatible encodings uses self's encoding if both are ASCII-only" # ArgumentError: unknown encoding name - SHIFT_JIS
|
52
59
|
fails "String#+ when self and the argument are in different ASCII-compatible encodings uses the argument's encoding if self is ASCII-only" # Expected #<Encoding:UTF-8> == #<Encoding:ISO-8859-1> to be truthy but was false
|
53
|
-
fails "String#+ when self is in an ASCII-incompatible encoding incompatible with the argument's encoding raises Encoding::CompatibilityError if neither are empty" # Expected
|
54
|
-
fails "String#+ when the argument is in an ASCII-incompatible encoding incompatible with self's encoding raises Encoding::CompatibilityError if neither are empty" # Expected
|
60
|
+
fails "String#+ when self is in an ASCII-incompatible encoding incompatible with the argument's encoding raises Encoding::CompatibilityError if neither are empty" # Expected CompatibilityError but no exception was raised ("xy" was returned)
|
61
|
+
fails "String#+ when the argument is in an ASCII-incompatible encoding incompatible with self's encoding raises Encoding::CompatibilityError if neither are empty" # Expected CompatibilityError but no exception was raised ("xy" was returned)
|
62
|
+
fails "String#-@ does not deduplicate a frozen string when it has instance variables" # Exception: Cannot create property 'a' on string 'this string is frozen'
|
55
63
|
fails "String#-@ returns the same object for equal unfrozen strings" # Expected "this is a string" not to be identical to "this is a string"
|
56
64
|
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.
|
57
65
|
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.
|
58
66
|
fails "String#<=> with String compares the indices of the encodings when the strings have identical non-ASCII-compatible bytes" # Expected 0 == -1 to be truthy but was false
|
67
|
+
fails "String#<=> with String returns 0 when comparing 2 empty strings but one is not ASCII-compatible" # ArgumentError: unknown encoding name - iso-2022-jp
|
59
68
|
fails "String#== considers encoding compatibility" # Expected true to be false
|
60
69
|
fails "String#== considers encoding difference of incompatible string" # Expected true to be false
|
70
|
+
fails "String#== returns true when comparing 2 empty strings but one is not ASCII-compatible" # ArgumentError: unknown encoding name - iso-2022-jp
|
61
71
|
fails "String#=== considers encoding compatibility" # Expected true to be false
|
62
72
|
fails "String#=== considers encoding difference of incompatible string" # Expected true to be false
|
73
|
+
fails "String#=== returns true when comparing 2 empty strings but one is not ASCII-compatible" # ArgumentError: unknown encoding name - iso-2022-jp
|
63
74
|
fails "String#[] raises a RangeError if the index is too big" # Expected RangeError but no exception was raised (nil was returned)
|
64
75
|
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)
|
65
76
|
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)
|
77
|
+
fails "String#[] with Range returns a String in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
78
|
+
fails "String#[] with Regexp returns a String in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
79
|
+
fails "String#[] with Regexp, index returns a String in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
80
|
+
fails "String#[] with Regexp, index returns nil if the given capture group was not matched but still sets $~" # Exception: Cannot read properties of undefined (reading '$should')
|
66
81
|
fails "String#[] with String returns a String instance when given a subclass instance" # Expected "el" (StringSpecs::MyString) to be an instance of String
|
67
82
|
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)
|
68
|
-
fails "String#[] with index, length returns a string with the same encoding" #
|
69
|
-
fails "String#bytes yields each byte to a block if one is given, returning self" # Expected [
|
83
|
+
fails "String#[] with index, length returns a string with the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
84
|
+
fails "String#bytes yields each byte to a block if one is given, returning self" # Expected [230, 157, 177, 228, 186, 172] == "東京" to be truthy but was false
|
85
|
+
fails "String#byteslice on on non ASCII strings returns a String in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
70
86
|
fails "String#byteslice raises a RangeError if the index is too big" # Expected RangeError but no exception was raised (nil was returned)
|
71
87
|
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)
|
72
88
|
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)
|
89
|
+
fails "String#byteslice with Range returns a String in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
73
90
|
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)
|
74
|
-
fails "String#byteslice with index, length returns a string with the same encoding" #
|
75
|
-
fails "String#capitalize ASCII-only case mapping does not capitalize non-ASCII characters" # ArgumentError: [String#capitalize] wrong number of arguments(1
|
76
|
-
fails "String#capitalize
|
77
|
-
fails "String#capitalize full Unicode case mapping adapted for Lithuanian
|
78
|
-
fails "String#capitalize full Unicode case mapping adapted for
|
79
|
-
fails "String#capitalize full Unicode case mapping adapted for Turkic languages
|
80
|
-
fails "String#capitalize full Unicode case mapping
|
81
|
-
fails "String#capitalize full Unicode case mapping
|
91
|
+
fails "String#byteslice with index, length returns a string with the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
92
|
+
fails "String#capitalize ASCII-only case mapping does not capitalize non-ASCII characters" # ArgumentError: [String#capitalize] wrong number of arguments (given 1, expected 0)
|
93
|
+
fails "String#capitalize ASCII-only case mapping handles non-ASCII substrings properly" # ArgumentError: [String#capitalize] wrong number of arguments (given 1, expected 0)
|
94
|
+
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 (given 2, expected 0)
|
95
|
+
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 (given 1, expected 0)
|
96
|
+
fails "String#capitalize full Unicode case mapping adapted for Turkic languages allows Lithuanian as an extra option" # ArgumentError: [String#capitalize] wrong number of arguments (given 2, expected 0)
|
97
|
+
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 (given 1, expected 0)
|
98
|
+
fails "String#capitalize full Unicode case mapping only capitalizes the first resulting character when upcasing a character produces a multi-character sequence" # Expected "SS" == "Ss" to be truthy but was false
|
99
|
+
fails "String#capitalize full Unicode case mapping updates string metadata" # Expected "SSet" == "Sset" to be truthy but was false
|
100
|
+
fails "String#capitalize returns a String in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
82
101
|
fails "String#casecmp independent of case returns nil if incompatible encodings" # NameError: uninitialized constant Encoding::EUC_JP
|
83
102
|
fails "String#casecmp? independent of case case folds" # Expected false to be true
|
84
|
-
fails "String#casecmp? independent of case for UNICODE characters returns true when downcase(:fold) on unicode" # Expected false to
|
85
|
-
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
|
103
|
+
fails "String#casecmp? independent of case for UNICODE characters returns true when downcase(:fold) on unicode" # Expected false == true to be truthy but was false
|
104
|
+
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 == true to be truthy but was false
|
86
105
|
fails "String#casecmp? independent of case returns nil if incompatible encodings" # NameError: uninitialized constant Encoding::EUC_JP
|
106
|
+
fails "String#chomp when passed no argument returns a String in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
87
107
|
fails "String#chomp when passed no argument returns a copy of the String when it is not modified" # Expected "abc" not to be identical to "abc"
|
88
|
-
fails "String#
|
89
|
-
fails "String#clone
|
108
|
+
fails "String#chop returns a String in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
109
|
+
fails "String#clone calls #initialize_copy on the new instance" # Expected nil == "string" to be truthy but was false
|
110
|
+
fails "String#clone copies singleton methods" # TypeError: can't define singleton
|
111
|
+
fails "String#clone returns a String in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
90
112
|
fails "String#concat when self is BINARY and argument is US-ASCII uses BINARY encoding" # NoMethodError: undefined method `concat' for "abc"
|
91
113
|
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 ""
|
92
|
-
fails "String#
|
93
|
-
fails "String#
|
94
|
-
fails "String#
|
95
|
-
fails "String#downcase
|
96
|
-
fails "String#downcase
|
97
|
-
fails "String#downcase
|
114
|
+
fails "String#delete returns a String in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
115
|
+
fails "String#delete_prefix returns a String in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
116
|
+
fails "String#delete_suffix returns a String in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
117
|
+
fails "String#downcase ASCII-only case mapping does not downcase non-ASCII characters" # ArgumentError: [String#downcase] wrong number of arguments (given 1, expected 0)
|
118
|
+
fails "String#downcase ASCII-only case mapping works with substrings" # ArgumentError: [String#downcase] wrong number of arguments (given 1, expected 0)
|
119
|
+
fails "String#downcase case folding case folds special characters" # ArgumentError: [String#downcase] wrong number of arguments (given 1, expected 0)
|
120
|
+
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 (given 2, expected 0)
|
121
|
+
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 (given 1, expected 0)
|
122
|
+
fails "String#downcase full Unicode case mapping adapted for Turkic languages allows Lithuanian as an extra option" # ArgumentError: [String#downcase] wrong number of arguments (given 2, expected 0)
|
123
|
+
fails "String#downcase full Unicode case mapping adapted for Turkic languages downcases characters according to Turkic semantics" # ArgumentError: [String#downcase] wrong number of arguments (given 1, expected 0)
|
124
|
+
fails "String#downcase returns a String in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
98
125
|
fails "String#dump does not take into account if a string is frozen" # NoMethodError: undefined method `dump' for "foo"
|
99
126
|
fails "String#dump includes .force_encoding(name) if the encoding isn't ASCII compatible" # NoMethodError: undefined method `dump' for "ࡶ"
|
100
|
-
fails "String#dump
|
127
|
+
fails "String#dump returns a String in the same encoding as self" # NoMethodError: undefined method `dump' for "foo"
|
101
128
|
fails "String#dump returns a String instance" # NoMethodError: undefined method `dump' for ""
|
102
129
|
fails "String#dump returns a string with # not escaped when followed by any other character" # NoMethodError: undefined method `dump' for "#"
|
103
130
|
fails "String#dump returns a string with \" and \\ escaped with a backslash" # NoMethodError: undefined method `dump' for "\""
|
104
131
|
fails "String#dump returns a string with \\#<char> when # is followed by $, @, @@, {" # NoMethodError: undefined method `dump' for "\#$PATH"
|
105
132
|
fails "String#dump returns a string with lower-case alpha characters unescaped" # NoMethodError: undefined method `dump' for "a"
|
106
133
|
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"
|
107
|
-
fails "String#dump returns a string with non-printing ASCII characters replaced by \\x notation" # NoMethodError: undefined method `dump' for "\
|
134
|
+
fails "String#dump returns a string with non-printing ASCII characters replaced by \\x notation" # NoMethodError: undefined method `dump' for "\x00"
|
108
135
|
fails "String#dump returns a string with non-printing single-byte UTF-8 characters replaced by \\x notation" # NoMethodError: undefined method `dump' for "\u0000"
|
109
136
|
fails "String#dump returns a string with numeric characters unescaped" # NoMethodError: undefined method `dump' for "0"
|
110
137
|
fails "String#dump returns a string with printable non-alphanumeric characters unescaped" # NoMethodError: undefined method `dump' for " "
|
111
138
|
fails "String#dump returns a string with special characters replaced with \\<char> notation" # NoMethodError: undefined method `dump' for "\a"
|
112
139
|
fails "String#dump returns a string with upper-case alpha characters unescaped" # NoMethodError: undefined method `dump' for "A"
|
113
140
|
fails "String#dump wraps string with \"" # NoMethodError: undefined method `dump' for "foo"
|
114
|
-
fails "String#dup calls #initialize_copy on the new instance" # Expected nil
|
141
|
+
fails "String#dup calls #initialize_copy on the new instance" # Expected nil == "string" to be truthy but was false
|
142
|
+
fails "String#dup does not modify the original setbyte-mutated string when changing dupped string" # NoMethodError: undefined method `setbyte' for "a"
|
143
|
+
fails "String#dup returns a String in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
115
144
|
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.
|
116
145
|
fails "String#each_grapheme_cluster is unicode aware" # NoMethodError: undefined method `each_grapheme_cluster' for "Ç∂éƒg"
|
117
146
|
fails "String#each_grapheme_cluster passes each char in self to the given block" # NoMethodError: undefined method `each_grapheme_cluster' for "hello"
|
@@ -125,11 +154,14 @@ opal_filter "String" do
|
|
125
154
|
fails "String#each_grapheme_cluster works if the String's contents is invalid for its encoding" # Expected true to be false
|
126
155
|
fails "String#each_grapheme_cluster works with multibyte characters" # NoMethodError: undefined method `each_grapheme_cluster' for "覇"
|
127
156
|
fails "String#each_grapheme_cluster yields String instances for subclasses" # NoMethodError: undefined method `each_grapheme_cluster' for "abc"
|
157
|
+
fails "String#each_line returns Strings in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
128
158
|
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
|
129
|
-
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>
|
159
|
+
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> == #<Encoding:US-ASCII> to be truthy but was false
|
160
|
+
fails "String#end_with? checks that we are starting to match at the head of a character" # Expected "ab".end_with? "b" to be falsy but was true
|
130
161
|
fails "String#end_with? raises an Encoding::CompatibilityError if the encodings are incompatible" # NameError: uninitialized constant Encoding::EUC_JP
|
131
162
|
fails "String#eql? considers encoding compatibility" # Expected true to be false
|
132
163
|
fails "String#eql? considers encoding difference of incompatible string" # Expected true to be false
|
164
|
+
fails "String#eql? returns true when comparing 2 empty strings but one is not ASCII-compatible" # ArgumentError: unknown encoding name - iso-2022-jp
|
133
165
|
fails "String#force_encoding with a special encoding name accepts valid special encoding names" # NoMethodError: undefined method `default_internal' for Encoding
|
134
166
|
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
|
135
167
|
fails "String#grapheme_clusters is unicode aware" # NoMethodError: undefined method `grapheme_clusters' for "Ç∂éƒg"
|
@@ -143,78 +175,128 @@ opal_filter "String" do
|
|
143
175
|
fails "String#grapheme_clusters works if the String's contents is invalid for its encoding" # Expected true to be false
|
144
176
|
fails "String#grapheme_clusters works with multibyte characters" # NoMethodError: undefined method `grapheme_clusters' for "覇"
|
145
177
|
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
|
146
|
-
fails "String#gsub with pattern and block raises an Encoding::CompatibilityError if the encodings are not compatible" # Expected
|
178
|
+
fails "String#gsub with pattern and block raises an Encoding::CompatibilityError if the encodings are not compatible" # Expected CompatibilityError but got: ArgumentError (unknown encoding name - iso-8859-5)
|
147
179
|
fails "String#gsub with pattern and block replaces the incompatible part properly even if the encodings are not compatible" # ArgumentError: unknown encoding name - iso-8859-5
|
148
180
|
fails "String#gsub with pattern and block uses the compatible encoding if they are compatible" # Expected #<Encoding:UTF-8> == #<Encoding:ASCII-8BIT> to be truthy but was false
|
149
181
|
fails "String#gsub with pattern and replacement doesn't freak out when replacing ^" # Expected " Text " == " Text " to be truthy but was false
|
150
|
-
fails "String#gsub with pattern and replacement
|
182
|
+
fails "String#gsub with pattern and replacement handles a pattern in a superset encoding" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
183
|
+
fails "String#gsub with pattern and replacement replaces \\k named backreferences with the regexp's corresponding capture" # Expected "h<\\k<foo>>ll<\\k<foo>>" == "h<e>ll<o>" to be truthy but was false
|
151
184
|
fails "String#gsub with pattern and replacement supports \\G which matches at the beginning of the remaining (non-matched) string" # Expected "hello homely world. hah!" == "huh? huh? world. hah!" to be truthy but was false
|
152
185
|
fails "String#include? with String raises an Encoding::CompatibilityError if the encodings are incompatible" # NameError: uninitialized constant Encoding::EUC_JP
|
186
|
+
fails "String#include? with String returns true if both strings are empty" # ArgumentError: unknown encoding name - EUC-JP
|
187
|
+
fails "String#include? with String returns true if the RHS is empty" # ArgumentError: unknown encoding name - EUC-JP
|
188
|
+
fails "String#insert with index, other should not call subclassed string methods" # NoMethodError: undefined method `insert' for "abcd"
|
153
189
|
fails "String#inspect returns a string with non-printing characters replaced by \\x notation" # Expected "\"\\xA0\"" to be computed by " ".inspect (computed "\" \"" instead)
|
154
|
-
fails "String#inspect uses \\x notation for broken UTF-8 sequences" # Expected "\"ð\\
|
190
|
+
fails "String#inspect uses \\x notation for broken UTF-8 sequences" # Expected "\"ð\\x9F\"" == "\"\\xF0\\x9F\"" to be truthy but was false
|
155
191
|
fails "String#inspect when the string's encoding is different than the result's encoding and the string has both ASCII-compatible and ASCII-incompatible chars returns a string with the non-ASCII characters replaced by \\u notation" # Expected "\"hello привет\"" == "\"hello \\u043F\\u0440\\u0438\\u0432\\u0435\\u0442\"" to be truthy but was false
|
156
192
|
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
|
157
|
-
fails "String#
|
158
|
-
fails "String#intern
|
159
|
-
fails "String#intern
|
160
|
-
fails "String#intern returns a
|
161
|
-
fails "String#intern returns a
|
193
|
+
fails "String#inspect works for broken US-ASCII strings" # Expected "\"©\"" == "\"\\xC2\\xA9\"" to be truthy but was false
|
194
|
+
fails "String#intern ignores existing symbols with different encoding" # Expected #<Encoding:UTF-8> == #<Encoding:ISO-8859-1> to be truthy but was false
|
195
|
+
fails "String#intern raises an EncodingError for UTF-8 String containing invalid bytes" # Expected "Ã".valid_encoding? to be falsy but was true
|
196
|
+
fails "String#intern returns a US-ASCII Symbol for a UTF-8 String containing only US-ASCII characters" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
197
|
+
fails "String#intern returns a US-ASCII Symbol for a binary String containing only US-ASCII characters" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
198
|
+
fails "String#intern returns a UTF-16LE Symbol for a UTF-16LE String containing non US-ASCII characters" # Expected #<Encoding:UTF-8> == #<Encoding:UTF-16LE> to be truthy but was false
|
199
|
+
fails "String#intern returns a binary Symbol for a binary String containing non US-ASCII characters" # Expected #<Encoding:UTF-8> == #<Encoding:ASCII-8BIT> to be truthy but was false
|
162
200
|
fails "String#length adds 1 (and not 2) for a incomplete surrogate in UTF-16" # Expected 2 == 1 to be truthy but was false
|
163
201
|
fails "String#length adds 1 for a broken sequence in UTF-32" # Expected 4 == 1 to be truthy but was false
|
164
202
|
fails "String#length returns the correct length after force_encoding(BINARY)" # Expected 2 == 4 to be truthy but was false
|
203
|
+
fails "String#lines returns Strings in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
204
|
+
fails "String#lstrip returns a String in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
205
|
+
fails "String#next returns a String in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
206
|
+
fails "String#ord raises ArgumentError if the character is broken" # Expected ArgumentError (invalid byte sequence in US-ASCII) but no exception was raised (169 was returned)
|
207
|
+
fails "String#partition with String handles a pattern in a subset encoding" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
208
|
+
fails "String#partition with String handles a pattern in a superset encoding" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
165
209
|
fails "String#partition with String returns String instances when called on a subclass" # Expected "hello" (StringSpecs::MyString) to be an instance of String
|
210
|
+
fails "String#partition with String returns before- and after- parts in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
211
|
+
fails "String#reverse returns a String in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
212
|
+
fails "String#reverse works with a broken string" # Expected true to be false
|
213
|
+
fails "String#rpartition with String handles a pattern in a subset encoding" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
214
|
+
fails "String#rpartition with String handles a pattern in a superset encoding" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
166
215
|
fails "String#rpartition with String returns String instances when called on a subclass" # Expected "hello" (StringSpecs::MyString) to be an instance of String
|
216
|
+
fails "String#rpartition with String returns before- and after- parts in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
167
217
|
fails "String#rpartition with String returns new object if doesn't match" # Expected "hello".equal? "hello" to be falsy but was true
|
218
|
+
fails "String#rstrip returns a String in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
219
|
+
fails "String#scan returns Strings in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
168
220
|
fails "String#size adds 1 (and not 2) for a incomplete surrogate in UTF-16" # Expected 2 == 1 to be truthy but was false
|
169
221
|
fails "String#size adds 1 for a broken sequence in UTF-32" # Expected 4 == 1 to be truthy but was false
|
170
222
|
fails "String#size returns the correct length after force_encoding(BINARY)" # Expected 2 == 4 to be truthy but was false
|
171
223
|
fails "String#slice raises a RangeError if the index is too big" # Expected RangeError but no exception was raised (nil was returned)
|
172
224
|
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)
|
173
225
|
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)
|
226
|
+
fails "String#slice with Range returns a String in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
227
|
+
fails "String#slice with Regexp returns a String in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
228
|
+
fails "String#slice with Regexp, index returns a String in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
229
|
+
fails "String#slice with Regexp, index returns nil if the given capture group was not matched but still sets $~" # Exception: Cannot read properties of undefined (reading '$should')
|
174
230
|
fails "String#slice with String returns a String instance when given a subclass instance" # Expected "el" (StringSpecs::MyString) to be an instance of String
|
175
231
|
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)
|
176
|
-
fails "String#slice with index, length returns a string with the same encoding" #
|
232
|
+
fails "String#slice with index, length returns a string with the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
177
233
|
fails "String#split with Regexp allows concurrent Regexp calls in a shared context" # NotImplementedError: Thread creation not available
|
178
|
-
fails "String#split with Regexp applies the limit to the number of split substrings, without counting captures" # Expected ["a", "aBa"]
|
234
|
+
fails "String#split with Regexp applies the limit to the number of split substrings, without counting captures" # Expected ["a", "aBa"] == ["a", "B", "", "", "aBa"] to be truthy but was false
|
179
235
|
fails "String#split with Regexp for a String subclass yields instances of String" # Expected nil (NilClass) to be an instance of String
|
180
|
-
fails "String#split with Regexp
|
236
|
+
fails "String#split with Regexp raises a TypeError when not called with nil, String, or Regexp" # Expected TypeError but no exception was raised (["he", "o"] was returned)
|
237
|
+
fails "String#split with Regexp returns String instances based on self" # Expected "x:y:z:" (StringSpecs::MyString) to be an instance of String
|
181
238
|
fails "String#split with Regexp returns an ArgumentError if an invalid UTF-8 string is supplied" # NotImplementedError: String#chop! not supported. Mutable String methods are not supported in Opal.
|
239
|
+
fails "String#split with Regexp throws an ArgumentError if the string is not a valid" # Expected ArgumentError but no exception was raised ([] was returned)
|
182
240
|
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
|
183
241
|
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
|
184
242
|
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
|
185
243
|
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
|
244
|
+
fails "String#split with Regexp when a block is given yields each split substring with default pattern for a lazy substring" # Expected ["hunky", "baco"] == "hunky baco" to be truthy but was false
|
245
|
+
fails "String#split with Regexp when a block is given yields each split substring with default pattern for a non-ASCII lazy substring" # Expected ["'été", "arrive", "bientô"] == "'été arrive bientô" to be truthy but was false
|
186
246
|
fails "String#split with Regexp when a block is given yields each split substring with default pattern for a non-ASCII string" # Expected ["l'été", "arrive", "bientôt"] == "l'été arrive bientôt" to be truthy but was false
|
187
247
|
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
|
188
248
|
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
|
189
249
|
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
|
190
250
|
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
|
191
|
-
fails "String#split with String
|
251
|
+
fails "String#split with String doesn't split on non-ascii whitespace" # Expected ["a", "b"] == ["a b"] to be truthy but was false
|
252
|
+
fails "String#split with String raises a RangeError when the limit is larger than int" # Expected RangeError but no exception was raised (["a,b"] was returned)
|
253
|
+
fails "String#split with String returns String instances based on self" # Expected "x.y.z." (StringSpecs::MyString) to be an instance of String
|
254
|
+
fails "String#split with String returns Strings in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
255
|
+
fails "String#split with String returns an empty array when whitespace is split on whitespace" # Expected [""] == [] to be truthy but was false
|
256
|
+
fails "String#split with String throws an ArgumentError if the string is not a valid" # Expected ArgumentError but no exception was raised (["ß"] was returned)
|
192
257
|
fails "String#split with String when $; is not nil warns" # Expected warning to match: /warning: \$; is set to non-nil value/ but got: ""
|
258
|
+
fails "String#squeeze returns a String in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
259
|
+
fails "String#start_with? does not check that we are not matching part of a character" # Expected "é".start_with? "Ã" to be truthy but was false
|
260
|
+
fails "String#start_with? does not check we are matching only part of a character" # Expected "あ".start_with? "ã" to be truthy but was false
|
261
|
+
fails "String#strip returns a String in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
262
|
+
fails "String#sub with pattern, replacement handles a pattern in a superset encoding" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
193
263
|
fails "String#sub with pattern, replacement returns a copy of self when no modification is made" # Expected "hello" not to be identical to "hello"
|
194
264
|
fails "String#sub with pattern, replacement supports \\G which matches at the beginning of the string" # Expected "hello world!" == "hi world!" to be truthy but was false
|
195
|
-
fails "String#
|
196
|
-
fails "String#swapcase
|
197
|
-
fails "String#swapcase
|
198
|
-
fails "String#swapcase full Unicode case mapping adapted for
|
199
|
-
fails "String#swapcase full Unicode case mapping adapted for
|
200
|
-
fails "String#swapcase full Unicode case mapping
|
201
|
-
fails "String#swapcase full Unicode case mapping
|
202
|
-
fails "String#
|
203
|
-
fails "String#
|
204
|
-
fails "String#
|
205
|
-
fails "String#
|
206
|
-
fails "String#
|
207
|
-
fails "String#
|
265
|
+
fails "String#succ returns a String in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
266
|
+
fails "String#swapcase ASCII-only case mapping does not swapcase non-ASCII characters" # ArgumentError: [String#swapcase] wrong number of arguments (given 1, expected 0)
|
267
|
+
fails "String#swapcase ASCII-only case mapping works with substrings" # ArgumentError: [String#swapcase] wrong number of arguments (given 1, expected 0)
|
268
|
+
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 (given 2, expected 0)
|
269
|
+
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 (given 1, expected 0)
|
270
|
+
fails "String#swapcase full Unicode case mapping adapted for Turkic languages allows Lithuanian as an extra option" # ArgumentError: [String#swapcase] wrong number of arguments (given 2, expected 0)
|
271
|
+
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 (given 1, expected 0)
|
272
|
+
fails "String#swapcase full Unicode case mapping updates string metadata" # Expected "aßET" == "aSSET" to be truthy but was false
|
273
|
+
fails "String#swapcase full Unicode case mapping works for all of Unicode with no option" # Expected "äÖü" == "ÄöÜ" to be truthy but was false
|
274
|
+
fails "String#swapcase returns a String in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
275
|
+
fails "String#to_c allows null-byte" # Expected (1-2i) == (1+0i) to be truthy but was false
|
276
|
+
fails "String#to_c ignores leading whitespaces" # Expected (79+79i) == (79+4i) to be truthy but was false
|
277
|
+
fails "String#to_c raises Encoding::CompatibilityError if String is in not ASCII-compatible encoding" # Expected CompatibilityError (ASCII incompatible encoding: UTF-16) but got: ArgumentError (unknown encoding name - UTF-16)
|
278
|
+
fails "String#to_c understands 'a+i' to mean a complex number with 'a' as the real part, 1i as the imaginary" # Expected (79+0i) == (79+1i) to be truthy but was false
|
279
|
+
fails "String#to_c understands 'a-i' to mean a complex number with 'a' as the real part, -1i as the imaginary" # Expected (79+0i) == (79-1i) to be truthy but was false
|
280
|
+
fails "String#to_c understands 'm@a' to mean a complex number in polar form with 'm' as the modulus, 'a' as the argument" # Expected (79+4i) == (-51.63784604822534-59.78739712932633i) to be truthy but was false
|
281
|
+
fails "String#to_c understands Float::INFINITY" # Expected (0+0i) == (0+1i) to be truthy but was false
|
282
|
+
fails "String#to_c understands scientific notation with e and E" # Expected (2+3i) == (2000+20000i) to be truthy but was false
|
283
|
+
fails "String#to_sym ignores existing symbols with different encoding" # Expected #<Encoding:UTF-8> == #<Encoding:ISO-8859-1> to be truthy but was false
|
284
|
+
fails "String#to_sym raises an EncodingError for UTF-8 String containing invalid bytes" # Expected "Ã".valid_encoding? to be falsy but was true
|
285
|
+
fails "String#to_sym returns a US-ASCII Symbol for a UTF-8 String containing only US-ASCII characters" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
286
|
+
fails "String#to_sym returns a US-ASCII Symbol for a binary String containing only US-ASCII characters" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
287
|
+
fails "String#to_sym returns a UTF-16LE Symbol for a UTF-16LE String containing non US-ASCII characters" # Expected #<Encoding:UTF-8> == #<Encoding:UTF-16LE> to be truthy but was false
|
288
|
+
fails "String#to_sym returns a binary Symbol for a binary String containing non US-ASCII characters" # Expected #<Encoding:UTF-8> == #<Encoding:ASCII-8BIT> to be truthy but was false
|
289
|
+
fails "String#undump Limitations cannot undump non ASCII-compatible string" # Expected CompatibilityError but got: NoMethodError (undefined method `undump' for "\"foo\"")
|
208
290
|
fails "String#undump always returns String instance" # NoMethodError: undefined method `undump' for "\"foo\""
|
209
291
|
fails "String#undump does not take into account if a string is frozen" # NoMethodError: undefined method `undump' for "\"foo\""
|
210
|
-
fails "String#undump invalid dump raises RuntimeError exception if wrapping \" are missing" #
|
211
|
-
fails "String#undump invalid dump raises RuntimeError if string contains \u0000 character" #
|
212
|
-
fails "String#undump invalid dump raises RuntimeError if string contains non ASCII character" #
|
213
|
-
fails "String#undump invalid dump raises RuntimeError if there are some excessive \"" #
|
214
|
-
fails "String#undump invalid dump raises RuntimeError if there is incorrect \\x sequence" #
|
215
|
-
fails "String#undump invalid dump raises RuntimeError if there is malformed dump of non ASCII-compatible string" #
|
216
|
-
fails "String#undump invalid dump raises RuntimeError in there is incorrect \\u sequence" #
|
217
|
-
fails "String#undump
|
292
|
+
fails "String#undump invalid dump raises RuntimeError exception if wrapping \" are missing" # Expected RuntimeError (/invalid dumped string/) but got: NoMethodError (undefined method `undump' for "foo")
|
293
|
+
fails "String#undump invalid dump raises RuntimeError if string contains \u0000 character" # Expected RuntimeError (/string contains null byte/) but got: NoMethodError (undefined method `undump' for "\"foo\u0000\"")
|
294
|
+
fails "String#undump invalid dump raises RuntimeError if string contains non ASCII character" # Expected RuntimeError (/non-ASCII character detected/) but got: NoMethodError (undefined method `undump' for "\"あ\"")
|
295
|
+
fails "String#undump invalid dump raises RuntimeError if there are some excessive \"" # Expected RuntimeError (/invalid dumped string/) but got: NoMethodError (undefined method `undump' for "\" \"\" \"")
|
296
|
+
fails "String#undump invalid dump raises RuntimeError if there is incorrect \\x sequence" # Expected RuntimeError (/invalid hex escape/) but got: NoMethodError (undefined method `undump' for "\"\\x\"")
|
297
|
+
fails "String#undump invalid dump raises RuntimeError if there is malformed dump of non ASCII-compatible string" # Expected RuntimeError (/invalid dumped string/) but got: NoMethodError (undefined method `undump' for "\"\".force_encoding(\"BINARY\"")
|
298
|
+
fails "String#undump invalid dump raises RuntimeError in there is incorrect \\u sequence" # Expected RuntimeError (/invalid Unicode escape/) but got: NoMethodError (undefined method `undump' for "\"\\u\"")
|
299
|
+
fails "String#undump returns a String in the same encoding as self" # NoMethodError: undefined method `undump' for "\"foo\""
|
218
300
|
fails "String#undump returns a string with # not escaped when followed by any other character" # NoMethodError: undefined method `undump' for "\"#\""
|
219
301
|
fails "String#undump returns a string with \\uXXXX notation replaced with multi-byte UTF-8 characters" # NoMethodError: undefined method `undump' for "\"\\u0080\""
|
220
302
|
fails "String#undump returns a string with \\u{} notation replaced with multi-byte UTF-8 characters" # NoMethodError: undefined method `undump' for "\"\\u80\""
|
@@ -228,21 +310,27 @@ opal_filter "String" do
|
|
228
310
|
fails "String#undump returns a string with upper-case alpha characters unescaped" # NoMethodError: undefined method `undump' for "\"A\""
|
229
311
|
fails "String#undump strips outer \"" # NoMethodError: undefined method `undump' for "\"foo\""
|
230
312
|
fails "String#undump undumps correctly string produced from non ASCII-compatible one" # NoMethodError: undefined method `dump' for "ࡶ"
|
231
|
-
fails "String#unicode_normalize raises an Encoding::CompatibilityError if string is not in an unicode encoding" #
|
232
|
-
fails "String#unicode_normalized? raises an Encoding::CompatibilityError if the string is not in an unicode encoding" #
|
233
|
-
fails "String#unicode_normalized? returns true if str is in Unicode normalization form (nfc)" #
|
234
|
-
fails "String#unicode_normalized? returns true if str is in Unicode normalization form (nfd)" #
|
235
|
-
fails "String#unicode_normalized? returns true if str is in Unicode normalization form (nfkc)" #
|
236
|
-
fails "String#unicode_normalized? returns true if str is in Unicode normalization form (nfkd)" #
|
313
|
+
fails "String#unicode_normalize raises an Encoding::CompatibilityError if string is not in an unicode encoding" # Expected CompatibilityError but no exception was raised ("à" was returned)
|
314
|
+
fails "String#unicode_normalized? raises an Encoding::CompatibilityError if the string is not in an unicode encoding" # Expected CompatibilityError but no exception was raised (true was returned)
|
315
|
+
fails "String#unicode_normalized? returns true if str is in Unicode normalization form (nfc)" # NotImplementedError: String#unicode_normalize! not supported. Mutable String methods are not supported in Opal.
|
316
|
+
fails "String#unicode_normalized? returns true if str is in Unicode normalization form (nfd)" # NotImplementedError: String#unicode_normalize! not supported. Mutable String methods are not supported in Opal.
|
317
|
+
fails "String#unicode_normalized? returns true if str is in Unicode normalization form (nfkc)" # NotImplementedError: String#unicode_normalize! not supported. Mutable String methods are not supported in Opal.
|
318
|
+
fails "String#unicode_normalized? returns true if str is in Unicode normalization form (nfkd)" # NotImplementedError: String#unicode_normalize! not supported. Mutable String methods are not supported in Opal.
|
319
|
+
fails "String#unpack with format 'B' decodes into US-ASCII string values" # Expected "UTF-8" == "US-ASCII" to be truthy but was false
|
320
|
+
fails "String#unpack with format 'M' unpacks incomplete escape sequences as literal characters" # Expected ["foo"] == ["foo="] to be truthy but was false
|
321
|
+
fails "String#unpack with format 'Z' does not advance past the null byte when given a 'Z' format specifier" # RuntimeError: Unsupported unpack directive "x" (no chunk reader defined)
|
237
322
|
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)
|
238
323
|
fails "String#unpack1 returns the first value of #unpack" # RuntimeError: Unsupported unpack directive "x" (no chunk reader defined)
|
239
324
|
fails "String#unpack1 starts unpacking from the given offset" # RuntimeError: Unsupported unpack directive "x" (no chunk reader defined)
|
240
|
-
fails "String#upcase ASCII-only case mapping does not upcase non-ASCII characters" # ArgumentError: [String#upcase] wrong number of arguments(1
|
241
|
-
fails "String#upcase
|
242
|
-
fails "String#upcase full Unicode case mapping adapted for Lithuanian
|
243
|
-
fails "String#upcase full Unicode case mapping adapted for
|
244
|
-
fails "String#upcase full Unicode case mapping adapted for Turkic languages
|
325
|
+
fails "String#upcase ASCII-only case mapping does not upcase non-ASCII characters" # ArgumentError: [String#upcase] wrong number of arguments (given 1, expected 0)
|
326
|
+
fails "String#upcase ASCII-only case mapping works with substrings" # ArgumentError: [String#upcase] wrong number of arguments (given 1, expected 0)
|
327
|
+
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 (given 2, expected 0)
|
328
|
+
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 (given 1, expected 0)
|
329
|
+
fails "String#upcase full Unicode case mapping adapted for Turkic languages allows Lithuanian as an extra option" # ArgumentError: [String#upcase] wrong number of arguments (given 2, expected 0)
|
330
|
+
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 (given 1, expected 0)
|
331
|
+
fails "String#upcase returns a String in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
245
332
|
fails "String#valid_encoding? returns true for IBM720 encoding self is valid in" # ArgumentError: unknown encoding name - IBM720
|
246
|
-
fails "String.new accepts an encoding argument" # ArgumentError:
|
247
|
-
fails "String.new is called on subclasses" # Expected
|
333
|
+
fails "String.new accepts an encoding argument" # ArgumentError: unknown encoding name - euc-jp
|
334
|
+
fails "String.new is called on subclasses" # Expected "subclass" == "" to be truthy but was false
|
335
|
+
fails_badly "String#split with Regexp returns Strings in the same encoding as self" # Expected #<Encoding:UTF-8> == #<Encoding:US-ASCII> to be truthy but was false
|
248
336
|
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# NOTE: run bin/format-filters after changing this file
|
2
|
+
opal_filter "StringIO" do
|
3
|
+
fails "StringIO#each when passed chomp returns each line with removed separator when called without block" # Expected ["a b \n" + "c d e|", "1 2 3 4 5\n" + "|", "the end"] == ["a b \n" + "c d e", "1 2 3 4 5\n", "the end"] to be truthy but was false
|
4
|
+
fails "StringIO#each when passed chomp yields each line with removed separator to the passed block" # Expected ["a b \n" + "c d e|", "1 2 3 4 5\n" + "|", "the end"] == ["a b \n" + "c d e", "1 2 3 4 5\n", "the end"] to be truthy but was false
|
5
|
+
fails "StringIO#each when passed limit returns the data read until the limit is met" # NoMethodError: undefined method `[]' for nil
|
6
|
+
fails "StringIO#each_line when passed limit returns the data read until the limit is met" # NoMethodError: undefined method `[]' for nil
|
7
|
+
end
|