From 46d50ed954d50bd4c42ed31199b7460b9fcf6ff8 Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Tue, 24 May 2022 17:52:38 +0300 Subject: [PATCH] Common: fix test for printf --- pkgs/ruby/spec/lib/kernaux/sprintf_spec.rb | 6 ++++++ tests/printf_orig.yml | 3 --- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/ruby/spec/lib/kernaux/sprintf_spec.rb b/pkgs/ruby/spec/lib/kernaux/sprintf_spec.rb index 02eb7cc..6609100 100644 --- a/pkgs/ruby/spec/lib/kernaux/sprintf_spec.rb +++ b/pkgs/ruby/spec/lib/kernaux/sprintf_spec.rb @@ -10,6 +10,12 @@ RSpec.describe KernAux, '.sprintf' do it { is_expected.to be_frozen } it { is_expected.to eq 'Hello, World!' } + context 'for empty string value' do + subject(:sprintf) { described_class.sprintf ['Hello testing%s'] } + + it { is_expected.to eq 'Hello testing' } + end + [ ['', 'using regular tests'], ['_orig', 'using original tests'], diff --git a/tests/printf_orig.yml b/tests/printf_orig.yml index 84f2371..edbc11a 100644 --- a/tests/printf_orig.yml +++ b/tests/printf_orig.yml @@ -204,9 +204,6 @@ - result: 'Hello testing' args: ['Hello testing'] -- result: 'Hello testing' - args: [['Hello testing%s']] - fixme: true - result: 'Hello testing' args: [['Hello testing%s', '']] - result: 'Hello testing'