Skip to content

Commit 295fb99

Browse files
committed
Fix launcher specs to use actual language options
1 parent 89c1650 commit 295fb99

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

spec/tags/truffle/launcher_tags.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,4 @@ fails:The launcher 'gem' runs as an -S command
106106
fails:The launcher 'gem' in `RbConfig::CONFIG['bindir']` directory runs
107107
fails:The launcher 'gem' in `RbConfig::CONFIG['extra_bindirs'][0]` directory runs
108108
fails:The launcher 'gem' in `RbConfig::CONFIG['extra_bindirs'][1]` directory runs
109+
slow:The launcher prints the version with --version

spec/truffle/launcher_spec.rb

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -272,18 +272,22 @@ def should_print_full_java_command(options, env: {})
272272
end
273273
end
274274

275-
it "understands ruby polyglot options" do
276-
out = ruby_exe(nil, options: "--ruby.show_version=true --ruby.to_execute=p:b --ruby.execution_action=INLINE")
275+
it "prints the version with --version" do
276+
out = ruby_exe(nil, options: "--version")
277277
$?.success?.should == true
278278
out.should include(RUBY_DESCRIPTION)
279-
out.should include(':b')
279+
end
280+
281+
it "understands ruby polyglot options" do
282+
out = ruby_exe("p Truffle::Boot.get_option('rubygems')", options: "--ruby.rubygems=false")
283+
$?.success?.should == true
284+
out.should include('false')
280285
end
281286

282287
it "understands ruby polyglot options without ruby. prefix" do
283-
out = ruby_exe(nil, options: "--show_version=true --to_execute=p:b --execution_action=INLINE")
288+
out = ruby_exe("p Truffle::Boot.get_option('rubygems')", options: "--rubygems=false")
284289
$?.success?.should == true
285-
out.should include(RUBY_DESCRIPTION)
286-
out.should include(':b')
290+
out.should include('false')
287291
end
288292

289293
it "does not print a Java backtrace for an -S file that's not found" do

0 commit comments

Comments
 (0)