diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-08-22 21:27:11 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-08-22 21:27:11 +0000 |
| commit | 1b2ee4bb9d9fef44bdf8217f45d6893b7609a432 (patch) | |
| tree | eeab100adbabf62c809082f8a9ee0b469d017bec /test/language/scope.rb | |
| parent | ea32a38d73dc4c1dec030c2c52d339e8976b881b (diff) | |
| download | puppet-1b2ee4bb9d9fef44bdf8217f45d6893b7609a432.tar.gz puppet-1b2ee4bb9d9fef44bdf8217f45d6893b7609a432.tar.xz puppet-1b2ee4bb9d9fef44bdf8217f45d6893b7609a432.zip | |
Adding "if/else" constructs. No operators, no elsif, but it is a good start, anyway.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1483 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/language/scope.rb')
| -rwxr-xr-x | test/language/scope.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/language/scope.rb b/test/language/scope.rb index 7fdfdfd90..bf5eadd8d 100755 --- a/test/language/scope.rb +++ b/test/language/scope.rb @@ -707,6 +707,18 @@ class TestScope < Test::Unit::TestCase assert_equal("parentfoo", flat[0]["owner"], "default did not take") end + # Make sure we know what we consider to be truth. + def test_truth + assert_equal(true, Puppet::Parser::Scope.true?("a string"), + "Strings not considered true") + assert_equal(true, Puppet::Parser::Scope.true?(true), + "True considered true") + assert_equal(false, Puppet::Parser::Scope.true?(""), + "Empty strings considered true") + assert_equal(false, Puppet::Parser::Scope.true?(false), + "false considered true") + end + if defined? ActiveRecord # Verify that we recursively mark as collectable the results of collectable # components. |
