diff options
| author | Ian Taylor <ian@lorf.org> | 2009-06-05 12:38:35 -0400 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2009-06-06 09:11:28 +1000 |
| commit | 41ce18cc8ea239d1633fc6cd9e9f599957a82e74 (patch) | |
| tree | 9d398b4e3e6d726a174b5b57094c7dd6749ccf0e /spec/unit/parser/functions/sprintf.rb | |
| parent | f3b40923605420f774dac298fb1708de180c0a81 (diff) | |
| download | puppet-41ce18cc8ea239d1633fc6cd9e9f599957a82e74.tar.gz puppet-41ce18cc8ea239d1633fc6cd9e9f599957a82e74.tar.xz puppet-41ce18cc8ea239d1633fc6cd9e9f599957a82e74.zip | |
Changed tabs to spaces without interfering with indentation or alignment
Diffstat (limited to 'spec/unit/parser/functions/sprintf.rb')
| -rw-r--r-- | spec/unit/parser/functions/sprintf.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/spec/unit/parser/functions/sprintf.rb b/spec/unit/parser/functions/sprintf.rb index 8654b18fc..949dc3fcc 100644 --- a/spec/unit/parser/functions/sprintf.rb +++ b/spec/unit/parser/functions/sprintf.rb @@ -14,29 +14,29 @@ describe "the sprintf function" do it "should raise a ParseError if there is less than 1 argument" do lambda { @scope.function_sprintf([]) }.should( - raise_error(Puppet::ParseError)) + raise_error(Puppet::ParseError)) end it "should format integers" do - result = @scope.function_sprintf(["%+05d", "23"]) - result.should(eql("+0023")) + result = @scope.function_sprintf(["%+05d", "23"]) + result.should(eql("+0023")) end it "should format floats" do - result = @scope.function_sprintf(["%+.2f", "2.7182818284590451"]) - result.should(eql("+2.72")) + result = @scope.function_sprintf(["%+.2f", "2.7182818284590451"]) + result.should(eql("+2.72")) end it "should format large floats" do - result = @scope.function_sprintf(["%+.2e", "27182818284590451"]) - result.should(eql("+2.72e+16")) + result = @scope.function_sprintf(["%+.2e", "27182818284590451"]) + result.should(eql("+2.72e+16")) end it "should perform more complex formatting" do - result = @scope.function_sprintf( - [ "<%.8s:%#5o %#8X (%-8s)>", - "overlongstring", "23", "48879", "foo" ]) - result.should(eql("<overlong: 027 0XBEEF (foo )>")) + result = @scope.function_sprintf( + [ "<%.8s:%#5o %#8X (%-8s)>", + "overlongstring", "23", "48879", "foo" ]) + result.should(eql("<overlong: 027 0XBEEF (foo )>")) end end |
