diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-05-17 21:51:36 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-05-17 21:51:36 +0000 |
commit | e8d560ea8242d99f5be51f9385c5045f46ee7015 (patch) | |
tree | 5f1df5c7f41cfcd695ee7ddcde36a6ea81f1294f | |
parent | eed85f41ffc31649032114b7aa89a541d239a257 (diff) | |
download | puppet-e8d560ea8242d99f5be51f9385c5045f46ee7015.tar.gz puppet-e8d560ea8242d99f5be51f9385c5045f46ee7015.tar.xz puppet-e8d560ea8242d99f5be51f9385c5045f46ee7015.zip |
Fixing #566 -- definitions, tags, and classes can now be single characters
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2523 980ebf18-57e1-0310-9a29-db15c13687c0
-rw-r--r-- | CHANGELOG | 3 | ||||
-rw-r--r-- | lib/puppet/parser/scope.rb | 2 | ||||
-rwxr-xr-x | test/language/scope.rb | 2 |
3 files changed, 5 insertions, 2 deletions
@@ -1,3 +1,6 @@ + Tags (and thus definitions and classes) can now be a single + character. (#566) + Added an 'undef' keyword (#629), which will evaluate to "" within strings but when used as a resource parameter value will cause that parameter to be evaluated as undefined. diff --git a/lib/puppet/parser/scope.rb b/lib/puppet/parser/scope.rb index c7b36e36c..2f4917bee 100644 --- a/lib/puppet/parser/scope.rb +++ b/lib/puppet/parser/scope.rb @@ -629,7 +629,7 @@ class Puppet::Parser::Scope Puppet.debug "got told to tag with %s" % tag.inspect next end - unless tag =~ /^\w[-\w]+$/ + unless tag =~ /^\w[-\w]*$/ fail Puppet::ParseError, "Invalid tag %s" % tag.inspect end tag = tag.to_s diff --git a/test/language/scope.rb b/test/language/scope.rb index 0c9881dac..7fb14786e 100755 --- a/test/language/scope.rb +++ b/test/language/scope.rb @@ -613,7 +613,7 @@ Host <<||>>" end # Now make sure good tags make it through. - tags = %w{good-tag yaytag GoodTag another_tag} + tags = %w{good-tag yaytag GoodTag another_tag a ab A} tags.each do |tag| assert_nothing_raised("Tag #{tag} was considered invalid") do scope.tag tag |