diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-11-08 05:22:24 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-11-08 05:22:24 +0000 |
commit | 744ded30a02883dd8ce5fbf2b847f10acb226d6e (patch) | |
tree | d962b7b21f3a5d20dafd8e7f862c23a2449c2c9b /test/language/parser.rb | |
parent | dc4d98091a5566be289830839f1d6eb39367b42c (diff) | |
download | puppet-744ded30a02883dd8ce5fbf2b847f10acb226d6e.tar.gz puppet-744ded30a02883dd8ce5fbf2b847f10acb226d6e.tar.xz puppet-744ded30a02883dd8ce5fbf2b847f10acb226d6e.zip |
Merging the code over from the oscar branch. I will now be doing all development in the trunk again, except for larger changes, which will still get their own branch. This is a merge of the changes from revision 1826 to revision 1834.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1835 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/language/parser.rb')
-rwxr-xr-x | test/language/parser.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/language/parser.rb b/test/language/parser.rb index a90ff2c7a..fa87dc6f5 100755 --- a/test/language/parser.rb +++ b/test/language/parser.rb @@ -581,6 +581,29 @@ file { "/tmp/yayness": #assert_instance_of(AST::CollExpr, query.test2) end end + + # We've had problems with files other than site.pp importing into main. + def test_importing_into_main + top = tempfile() + other = tempfile() + File.open(top, "w") do |f| + f.puts "import '#{other}'" + end + + file = tempfile() + File.open(other, "w") do |f| + f.puts "file { '#{file}': ensure => present }" + end + + interp = mkinterp :Manifest => top, :UseNodes => false + + code = nil + assert_nothing_raised do + code = interp.run("hostname.domain.com", {}).flatten + end + assert(code.length == 1, "Did not get the file") + assert_instance_of(Puppet::TransObject, code[0]) + end end # $Id$ |