From dd99ee1f7d366e6b92b952fb96221bf0ea3dc348 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Sat, 15 Jan 2022 22:11:55 +0900 Subject: [wasm] bootstraptest, basictest: disable backquote literal tests WASI doesn't support spawning a new process for now. --- bootstraptest/runner.rb | 8 ++++++++ bootstraptest/test_literal.rb | 7 +++++-- 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'bootstraptest') diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb index 2cd91ffd07..b155db18aa 100755 --- a/bootstraptest/runner.rb +++ b/bootstraptest/runner.rb @@ -271,6 +271,14 @@ ensure 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) result = get_result_string(testsrc, opt, **argh) if @tty and @verbose diff --git a/bootstraptest/test_literal.rb b/bootstraptest/test_literal.rb index 9b3c10d519..a0d4ee08c6 100644 --- a/bootstraptest/test_literal.rb +++ b/bootstraptest/test_literal.rb @@ -65,8 +65,11 @@ assert_equal ':a3c', ':"a#{1+2}c".inspect' assert_equal 'Symbol', ':"a#{1+2}c".class' # xstring -assert_equal "foo\n", %q(`echo foo`) -assert_equal "foo\n", %q(s = "foo"; `echo #{s}`) +# 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(s = "foo"; `echo #{s}`) +end # regexp assert_equal '', '//.source' -- cgit v1.2.3