Skip to content

Commit b4605c2

Browse files
author
Ciaran McCrisken
committed
(IAC-1228) Remove '+' from shell_join_spec test data
Prior to this commit, the `spec/functions/shell_join_spec.rb` tests were failing on Ruby 2.7 as the `Shellwords.shelljoin` method in 2.7 does not escape the `+` character. Rather than have specific datasets for Ruby versions `< 2.7` and `>= 2.7`, it seemed easiest to simply remove this character from the tests.
1 parent 57b339a commit b4605c2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

spec/functions/shell_escape_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
it { is_expected.to run.with_params('foo').and_return('foo') }
1818
it { is_expected.to run.with_params('foo bar').and_return('foo\ bar') }
1919
it {
20-
is_expected.to run.with_params('~`!@#$%^&*()_+-=[]\{}|;\':",./<>?')
21-
.and_return('\~\`\!@\#\$\%\^\&\*\(\)_\+-\=\[\]\\\\\{\}\|\;\\\':\",./\<\>\?')
20+
is_expected.to run.with_params('~`!@#$%^&*()_-=[]\{}|;\':",./<>?')
21+
.and_return('\~\`\!@\#\$\%\^\&\*\(\)_-\=\[\]\\\\\{\}\|\;\\\':\",./\<\>\?')
2222
}
2323
end
2424

spec/functions/shell_join_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
it { is_expected.to run.with_params(['foo', 'bar']).and_return('foo bar') }
1515
it { is_expected.to run.with_params(['foo', 'bar baz']).and_return('foo bar\ baz') }
1616
it {
17-
is_expected.to run.with_params(['~`!@#$', '%^&*()_+-=', '[]\{}|;\':"', ',./<>?'])
18-
.and_return('\~\`\!@\#\$ \%\^\&\*\(\)_\+-\= \[\]\\\\\{\}\|\;\\\':\" ,./\<\>\?')
17+
is_expected.to run.with_params(['~`!@#$', '%^&*()_-=', '[]\{}|;\':"', ',./<>?'])
18+
.and_return('\~\`\!@\#\$ \%\^\&\*\(\)_-\= \[\]\\\\\{\}\|\;\\\':\" ,./\<\>\?')
1919
}
2020

2121
context 'with UTF8 and double byte characters' do

0 commit comments

Comments
 (0)