1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[wasm] bootstraptest, basictest: disable backquote literal tests

WASI doesn't support spawning a new process for now.
This commit is contained in:
Yuta Saito 2022-01-15 22:11:55 +09:00
parent df31fa4a51
commit dd99ee1f7d
Notes: git 2022-01-19 11:19:37 +09:00
3 changed files with 16 additions and 2 deletions

View file

@ -1960,6 +1960,8 @@ test_ok(p1.call == 5)
test_ok(i7 == nil) test_ok(i7 == nil)
end end
# WASI doesn't support spawning a new process for now.
unless /wasi/ =~ RUBY_PLATFORM
test_check "system" test_check "system"
test_ok(`echo foobar` == "foobar\n") test_ok(`echo foobar` == "foobar\n")
test_ok(`./miniruby -e 'print "foobar"'` == 'foobar') test_ok(`./miniruby -e 'print "foobar"'` == 'foobar')
@ -2010,6 +2012,7 @@ test_ok(done)
File.unlink script_tmp or `/bin/rm -f "#{script_tmp}"` File.unlink script_tmp or `/bin/rm -f "#{script_tmp}"`
File.unlink "#{script_tmp}.bak" or `/bin/rm -f "#{script_tmp}.bak"` File.unlink "#{script_tmp}.bak" or `/bin/rm -f "#{script_tmp}.bak"`
end # not /wasi/ =~ RUBY_PLATFORM
test_check "const" test_check "const"
TEST1 = 1 TEST1 = 1

View file

@ -271,6 +271,14 @@ ensure
end end
end end
def target_platform
if @ruby
`#{@ruby} --disable-gems -e 'print RUBY_PLATFORM'`
else
RUBY_PLATFORM
end
end
def show_limit(testsrc, opt = '', **argh) def show_limit(testsrc, opt = '', **argh)
result = get_result_string(testsrc, opt, **argh) result = get_result_string(testsrc, opt, **argh)
if @tty and @verbose if @tty and @verbose

View file

@ -65,8 +65,11 @@ assert_equal ':a3c', ':"a#{1+2}c".inspect'
assert_equal 'Symbol', ':"a#{1+2}c".class' assert_equal 'Symbol', ':"a#{1+2}c".class'
# xstring # xstring
# WASI doesn't support spawning a new process for now.
if /wasi/ !~ target_platform
assert_equal "foo\n", %q(`echo foo`) assert_equal "foo\n", %q(`echo foo`)
assert_equal "foo\n", %q(s = "foo"; `echo #{s}`) assert_equal "foo\n", %q(s = "foo"; `echo #{s}`)
end
# regexp # regexp
assert_equal '', '//.source' assert_equal '', '//.source'