summaryrefslogtreecommitdiff
path: root/spec/functions/squeeze_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/functions/squeeze_spec.rb')
-rwxr-xr-xspec/functions/squeeze_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/functions/squeeze_spec.rb b/spec/functions/squeeze_spec.rb
index 7f09c30..b267d9a 100755
--- a/spec/functions/squeeze_spec.rb
+++ b/spec/functions/squeeze_spec.rb
@@ -16,6 +16,12 @@ describe 'squeeze' do
it { is_expected.to run.with_params('aaaaaaaaabbbbbbbbbbcccccccccc', 'b-c').and_return('aaaaaaaaabc') }
end
+ context 'should run with UTF8 and double byte characters' do
+ it { is_expected.to run.with_params('ậậậậậậậậậậậậậậậậậậậậ').and_return('ậ') }
+ it { is_expected.to run.with_params('語語語語語語語', '語').and_return('語') }
+ it { is_expected.to run.with_params('ậậậậậậậậậậậậậậậậậ語語語語©©©©©', '©').and_return('ậậậậậậậậậậậậậậậậậ語語語語©') }
+ end
+
context 'when squeezing values in an array' do
it {
is_expected.to run \