summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2019-12-19 00:07:08 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2019-12-19 00:07:08 +0900
commit7f0e1fc90b49f207283f8be175a09b847b4c5211 (patch)
treef280d5982eb60151afdd27b6c9e6b1d01e799c6c /test
parent815e0c400a3fc889a1a3503e6fd21e56ab01faee (diff)
downloadmruby-7f0e1fc90b49f207283f8be175a09b847b4c5211.tar.gz
mruby-7f0e1fc90b49f207283f8be175a09b847b4c5211.zip
Revert "`%C` value need not to be saved in `TestVFormat::Native`; close #4868"
This reverts commit f507ff4842b92a60c0c600fa1f29efdf2688c877. It makes AppVeyor tests fail.
Diffstat (limited to 'test')
-rw-r--r--test/t/vformat.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/t/vformat.rb b/test/t/vformat.rb
index ef82f22bc..679f30407 100644
--- a/test/t/vformat.rb
+++ b/test/t/vformat.rb
@@ -1,4 +1,3 @@
-# coding: cp932
def assert_format(exp, args)
assert_equal(exp, TestVFormat.format(*args))
end
@@ -45,9 +44,9 @@ assert('mrb_vformat') do
# assert_format 'string and length', ['string %l length', n.s('andante'), n.l(3)]
assert_format '`n`: sym', ['`n`: %n', n.n(:sym)]
assert_format '%C文字列%', ['%s', n.s('%C文字列%')]
- assert_format '`C`: Kernel module', ['`C`: %C module', Kernel]
- assert_format '`C`: NilClass', ['`C`: %C', nil.class]
- assert_format_pattern '#<Class:#<String:0x*>>', ['%C', sclass("")]
+ assert_format '`C`: Kernel module', ['`C`: %C module', n.C(Kernel)]
+ assert_format '`C`: NilClass', ['`C`: %C', n.C(nil.class)]
+ assert_format_pattern '#<Class:#<String:0x*>>', ['%C', n.C(sclass(""))]
assert_format '`T`: NilClass', ['`T`: %T', nil]
assert_format '`T`: FalseClass', ['`T`: %T', false]
assert_format '`T`: TrueClass', ['`T`: %T', true]
@@ -70,7 +69,7 @@ assert('mrb_vformat') do
assert_format ':"&.": inspect symbol', ['%!n: inspect symbol', n.n(:'&.')]
assert_format 'inspect "String"', ['inspect %!v', 'String']
assert_format 'inspect Array: [1, :x, {}]', ['inspect Array: %!v', [1,:x,{}]]
- assert_format_pattern '`!C`: #<Class:0x*>', ['`!C`: %!C', Class.new]
+ assert_format_pattern '`!C`: #<Class:0x*>', ['`!C`: %!C', n.C(Class.new)]
assert_format 'to_s -> to_s: ab,cd', ['to_s -> to_s: %n,%v', n.n(:ab), 'cd']
assert_format 'to_s -> inspect: x:y', ['to_s -> inspect: %v%!v', 'x', :y]
assert_format 'inspect -> to_s: "a"b', ['inspect -> to_s: %!v%n', 'a', n.n(:b)]