summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMax Martin <max@puppetlabs.com>2011-04-13 17:30:44 -0700
committerMax Martin <max@puppetlabs.com>2011-04-13 17:30:44 -0700
commit3dde838ac992571e13262ea29ba3a0eb8152e753 (patch)
tree90520cf62bfa2f1bb9c992bbfe1bc47ae10471f2 /test
parentfe45c2417af580597cd39adec96a30a05a7cd66a (diff)
parent3ab44c7ce01ab86a995deb66228f5be95239c92a (diff)
downloadpuppet-3dde838ac992571e13262ea29ba3a0eb8152e753.tar.gz
puppet-3dde838ac992571e13262ea29ba3a0eb8152e753.tar.xz
puppet-3dde838ac992571e13262ea29ba3a0eb8152e753.zip
Merge branch 'next'
* next: (204 commits) Revert "(#6928) Removed --ignoreimport" Updated CHANGELOG for 2.6.8rc1 (#6928) Removed --ignoreimport (#6928) Remove --parseonly (#6928) Add a Parser face with Validate action (#6830) Fix sha1 to digest/sha1 require issue for Ruby 1.9 (#6830) Fix UTF-8 encoding issue for Ruby 1.9 (#6830) Fix string method sub call on a symbol for Ruby 1.9 (#2331) Remove darwinports pkg provider, replace with rewritten macports provider (#7059) handle inherited action binding scope maint: ensure we handle '-foo=' options correctly in faces. (#2150) Fix File const lookup when configuring routes Fixed #7082 - Added system support for groups maint: install erb templates under lib/ maint: clean up the spec test headers in bulk. (#7056) Use 'face' rather than 'faces' in the production code. maint: eliminate deprecated since 2008 code from Puppet. (#6117) Add POST support to indirector requests (#6962) Move option handling into #parse_options, not #preinit. maint: whitespace cleanup for puppet/util/command_line. ...
Diffstat (limited to 'test')
-rwxr-xr-xtest/language/functions.rb10
-rwxr-xr-xtest/language/parser.rb1
-rwxr-xr-xtest/language/scope.rb23
-rwxr-xr-xtest/test4
4 files changed, 12 insertions, 26 deletions
diff --git a/test/language/functions.rb b/test/language/functions.rb
index e882b68f3..84b1b3861 100755
--- a/test/language/functions.rb
+++ b/test/language/functions.rb
@@ -382,17 +382,15 @@ class TestLangFunctions < Test::Unit::TestCase
}.each do |string, value|
scope = mkscope
scope.setvar("yayness", string)
- assert_equal(string, scope.lookupvar("yayness", false))
+ assert_equal(string, scope.lookupvar("yayness"))
assert_nothing_raised("An empty string was not a valid variable value") do
ast.evaluate(scope)
end
-
- assert_equal(
- "template #{value}\n", scope.lookupvar("output"),
-
- "#{string.inspect} did not get evaluated correctly")
+ assert_equal(
+ "template #{value}\n", scope.lookupvar("output"),
+ "#{string.inspect} did not get evaluated correctly")
end
end
diff --git a/test/language/parser.rb b/test/language/parser.rb
index 36a9c4787..f7e636add 100755
--- a/test/language/parser.rb
+++ b/test/language/parser.rb
@@ -14,7 +14,6 @@ class TestParser < Test::Unit::TestCase
include PuppetTest::Support::Utils
def setup
super
- Puppet[:parseonly] = true
#@lexer = Puppet::Parser::Lexer.new
end
diff --git a/test/language/scope.rb b/test/language/scope.rb
index c4154dc27..ccc359651 100755
--- a/test/language/scope.rb
+++ b/test/language/scope.rb
@@ -42,22 +42,22 @@ class TestScope < Test::Unit::TestCase
# Set a variable in the top and make sure all three can get it
topscope.setvar("first", "topval")
scopes.each do |name, scope|
- assert_equal("topval", scope.lookupvar("first", false), "Could not find var in #{name}")
+ assert_equal("topval", scope.lookupvar("first"), "Could not find var in #{name}")
end
# Now set a var in the midscope and make sure the mid and bottom can see it but not the top
midscope.setvar("second", "midval")
- assert_equal(:undefined, scopes[:top].lookupvar("second", false), "Found child var in top scope")
+ assert_equal(:undefined, scopes[:top].lookupvar("second"), "Found child var in top scope")
[:mid, :bot].each do |name|
- assert_equal("midval", scopes[name].lookupvar("second", false), "Could not find var in #{name}")
+ assert_equal("midval", scopes[name].lookupvar("second"), "Could not find var in #{name}")
end
# And set something in the bottom, and make sure we only find it there.
botscope.setvar("third", "botval")
[:top, :mid].each do |name|
- assert_equal(:undefined, scopes[name].lookupvar("third", false), "Found child var in top scope")
+ assert_equal(:undefined, scopes[name].lookupvar("third"), "Found child var in top scope")
end
- assert_equal("botval", scopes[:bot].lookupvar("third", false), "Could not find var in bottom scope")
+ assert_equal("botval", scopes[:bot].lookupvar("third"), "Could not find var in bottom scope")
# Test that the scopes convert to hash structures correctly.
@@ -260,18 +260,7 @@ Host <<||>>"
scope = mkscope
scope.setvar("testing", :undef)
-
-
- assert_equal(
- :undef, scope.lookupvar("testing", false),
-
- "undef was not returned as :undef when not string")
-
-
- assert_equal(
- "", scope.lookupvar("testing", true),
-
- "undef was not returned as '' when string")
+ assert_equal(:undef, scope.lookupvar("testing"), "undef was not returned as :undef")
end
end
diff --git a/test/test b/test/test
index c8b9b08ef..8d2659cb7 100755
--- a/test/test
+++ b/test/test
@@ -68,8 +68,8 @@
#
# = Copyright
#
-# Copyright (c) 2005 Puppet Labs, LLC
-# Licensed under the GNU Public License
+# Copyright (c) 2005-2011 Puppet Labs, LLC
+# Licensed under the Apache 2.0 License
require 'find'
require 'getoptlong'