]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
(MODULES-444) Acceptance for multiple arrays
authorPeter Souter <p.souter@kainos.com>
Thu, 4 Dec 2014 14:15:33 +0000 (14:15 +0000)
committerPeter Souter <p.souter@kainos.com>
Thu, 4 Dec 2014 14:15:33 +0000 (14:15 +0000)
Acceptance test to take multiple arrays for concatenation

spec/acceptance/concat_spec.rb

index 0d5e831676136c662688140b7ea3b6554021d934..caf2f7d984939438c648642b20d08053819a6ce9 100755 (executable)
@@ -23,6 +23,17 @@ describe 'concat function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('oper
       }
       EOS
 
+      apply_manifest(pp, :catch_failures => true)
+    end
+    it 'should concat multiple arrays to one' do
+      pp = <<-EOS
+      $output = concat(['1','2','3'],['4','5','6'],['7','8','9'])
+      validate_array($output)
+      if size($output) != 6 {
+        fail("${output} should have 9 elements.")
+      }
+      EOS
+
       apply_manifest(pp, :catch_failures => true)
     end
   end