summaryrefslogtreecommitdiff
path: root/spec/syntax_suggest
diff options
context:
space:
mode:
authorschneems <richard.schneeman+foo@gmail.com>2022-11-25 16:12:30 -0600
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-11-28 20:55:41 +0900
commit4d51a0b495262073a8c1c0c9d7f276c4e6260688 (patch)
tree8cc377913e3908a918e12c029c8ba86aeaa3e306 /spec/syntax_suggest
parentee11090b280e21304a23511714f41f4057e59605 (diff)
downloadruby-4d51a0b495262073a8c1c0c9d7f276c4e6260688.tar.gz
[ruby/syntax_suggest] Failing test for #157
https://github.com/ruby/syntax_suggest/commit/14e8cdc916
Diffstat (limited to 'spec/syntax_suggest')
-rw-r--r--spec/syntax_suggest/integration/ruby_command_line_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/syntax_suggest/integration/ruby_command_line_spec.rb b/spec/syntax_suggest/integration/ruby_command_line_spec.rb
index 6ed1bf0bf7..0488de879f 100644
--- a/spec/syntax_suggest/integration/ruby_command_line_spec.rb
+++ b/spec/syntax_suggest/integration/ruby_command_line_spec.rb
@@ -150,5 +150,21 @@ module SyntaxSuggest
expect(out).to_not include("Could not find filename")
end
end
+
+ it "does not say 'syntax ok' when a syntax error fires" do
+ Dir.mktmpdir do |dir|
+ tmpdir = Pathname(dir)
+ script = tmpdir.join("script.rb")
+ script.write <<~'EOM'
+ break
+ EOM
+
+ out = `ruby -I#{lib_dir} -rsyntax_suggest -e "require_relative '#{script}'" 2>&1`
+
+ expect($?.success?).to be_falsey
+ expect(out.downcase).to_not include("syntax ok")
+ puts out
+ end
+ end
end
end