| 
300 | 300 |       '%o'      => '22',  | 
301 | 301 |       '%4.2o'   => '  22',  | 
302 | 302 |       '%#o'     => '022',  | 
 | 303 | +      '%#6.4o'  => '  0022',  | 
303 | 304 |       '%b'      => '10010',  | 
304 | 305 |       '%7.6b'   => ' 010010',  | 
305 | 306 |       '%#b'     => '0b10010',  | 
 | 
316 | 317 |       '%.1f'    => '18.0',  | 
317 | 318 |     }.each do |fmt, result |  | 
318 | 319 |       it "the format #{fmt} produces #{result}" do  | 
319 |  | -        pending("PUP-8612 %a and %A not support on JRuby") if RUBY_PLATFORM == 'java' && fmt =~ /^%[aA]$/  | 
320 | 320 |         string_formats = { Puppet::Pops::Types::PIntegerType::DEFAULT => fmt}  | 
321 | 321 |         expect(converter.convert(18, string_formats)).to eq(result)  | 
322 | 322 |       end  | 
323 | 323 |     end  | 
324 | 324 | 
 
  | 
325 |  | -    it 'the format %#6.4o produces 0022' do  | 
326 |  | -      string_formats = { Puppet::Pops::Types::PIntegerType::DEFAULT => '%#6.4o' }  | 
327 |  | -      result = RUBY_PLATFORM == 'java' ? ' 00022' : '  0022'  | 
328 |  | -      expect(converter.convert(18, string_formats)).to eq(result)  | 
329 |  | -    end  | 
330 |  | - | 
331 | 325 |     it 'produces a unicode char string by using format %c' do  | 
332 | 326 |       string_formats = { Puppet::Pops::Types::PIntegerType::DEFAULT => '%c'}  | 
333 | 327 |       expect(converter.convert(0x1F603, string_formats)).to eq("\u{1F603}")  | 
 | 
410 | 404 |       '%#B'     => '0B10010',  | 
411 | 405 |     }.each do |fmt, result |  | 
412 | 406 |       it "the format #{fmt} produces #{result}" do  | 
413 |  | -        pending("PUP-8612 %a and %A not support on JRuby") if RUBY_PLATFORM == 'java' && fmt =~ /^%[-.014]*[aA]$/  | 
414 | 407 |         string_formats = { Puppet::Pops::Types::PFloatType::DEFAULT => fmt}  | 
415 | 408 |         expect(converter.convert(18.0, string_formats)).to eq(result)  | 
416 | 409 |       end  | 
 | 
587 | 580 |       "%#Y"  => 'Y',  | 
588 | 581 |     }.each do |fmt, result |  | 
589 | 582 |       it "the format #{fmt} produces #{result}" do  | 
590 |  | -        pending("PUP-8612 %a and %A not support on JRuby") if RUBY_PLATFORM == 'java' && fmt =~ /^%[aA]$/  | 
591 | 583 |         string_formats = { Puppet::Pops::Types::PBooleanType::DEFAULT => fmt}  | 
592 | 584 |         expect(converter.convert(true, string_formats)).to eq(result)  | 
593 | 585 |       end  | 
 | 
634 | 626 |       "%#Y"  => 'N',  | 
635 | 627 |     }.each do |fmt, result |  | 
636 | 628 |       it "the format #{fmt} produces #{result}" do  | 
637 |  | -        pending("PUP-8612 %a and %A not support on JRuby") if RUBY_PLATFORM == 'java' && fmt =~ /^%[aA]$/  | 
638 | 629 |         string_formats = { Puppet::Pops::Types::PBooleanType::DEFAULT => fmt}  | 
639 | 630 |         expect(converter.convert(false, string_formats)).to eq(result)  | 
640 | 631 |       end  | 
 | 
692 | 683 |         short_array_t => "%(a",  | 
693 | 684 |         long_array_t  => "%[a",  | 
694 | 685 |       }  | 
695 |  | -      expect(converter.convert([1, 2], string_formats)).to eq('(1, 2)') unless RUBY_PLATFORM == 'java' # PUP-8615  | 
 | 686 | +      expect(converter.convert([1, 2], string_formats)).to eq('(1, 2)')  | 
696 | 687 |       expect(converter.convert([1, 2, 3], string_formats)).to eq('[1, 2, 3]')  | 
697 | 688 |     end  | 
698 | 689 | 
 
  | 
 | 
0 commit comments