Skip to content

Commit

Permalink
Strip console codes
Browse files Browse the repository at this point in the history
  • Loading branch information
JonRowe committed Mar 31, 2023
1 parent 278da52 commit f06eb1c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spec/integration/spec_file_load_errors_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def foo
"
run_command "--require ./broken_file"
expect(last_cmd_exit_status).to eq(error_exit_code)
output = normalize_durations(last_cmd_stdout).gsub(Dir.pwd, '.')
output = normalize_durations(last_cmd_stdout).gsub(Dir.pwd, '.').gsub(/\e\[[0-9;]+m/, '')

syntax_details =
if RUBY_VERSION.to_f >= 3.2
Expand All @@ -197,10 +197,10 @@ def foo
--> ./tmp/aruba/broken_file.rb
Unmatched keyword, missing `end' ?
1 class WorkInProgress
\e[0m> 2 \e[1;3m def initialize(arg)
\e[0m 4 end
\e[0m 5 end
\e[0m\e[1m./tmp/aruba/broken_file.rb:5: syntax error, unexpected end-of-input (\e[1;4mSyntaxError\e[m\e[1m)\e[m
> 2 def initialize(arg)
4 end
5 end
./tmp/aruba/broken_file.rb:5: syntax error, unexpected end-of-input (SyntaxError)
EOS
else
unindent(<<-EOS)
Expand Down

0 comments on commit f06eb1c

Please sign in to comment.