diff options
| author | Brice Figureau <brice-puppet@daysofwonder.com> | 2008-10-28 14:15:08 +0100 |
|---|---|---|
| committer | Brice Figureau <brice-puppet@daysofwonder.com> | 2008-10-29 10:28:32 +0100 |
| commit | 9f30306d2c768bad3327ecb7748669afb10cd4aa (patch) | |
| tree | 94eb572fc97edd80968549bcb7fe599193bb09f0 /test/language | |
| parent | 649a9e009a3a5bd070051b972c2cf26989af8e8c (diff) | |
| download | puppet-9f30306d2c768bad3327ecb7748669afb10cd4aa.tar.gz puppet-9f30306d2c768bad3327ecb7748669afb10cd4aa.tar.xz puppet-9f30306d2c768bad3327ecb7748669afb10cd4aa.zip | |
Fix #857 - Multiple class of the same name don't append code
The following manifest wasn't working:
class one {
notice('class one')
}
class one {
notice('second class one')
}
include one
It all boiled down to class code not being arrays.
Encapsulating code in ASTArray when needed is enough to append code,
because of the property of ASTArray to evaluate all their members in
turn.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'test/language')
| -rwxr-xr-x | test/language/snippets.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/language/snippets.rb b/test/language/snippets.rb index ebc977388..1003ded9f 100755 --- a/test/language/snippets.rb +++ b/test/language/snippets.rb @@ -460,6 +460,11 @@ class TestSnippets < Test::Unit::TestCase "Did not make second file from array") end + def snippet_multipleclass + assert_file("/tmp/multipleclassone", "one") + assert_file("/tmp/multipleclasstwo", "two") + end + # Iterate across each of the snippets and create a test. Dir.entries(snippetdir).sort.each { |file| next if file =~ /^\./ |
