0.5
app-cordova
debian/bullseye
debian/jessie
|
Last change
on this file since 2e0a90f was 1c22429, checked in by Joachim Langenbach <joachim.langenbach@…>, 10 years ago |
- gnuboat_epd adds the apt repository from gnuboat to install epd-fuse package
|
-
Property mode
set to
100755
|
|
File size:
903 bytes
|
| Line | |
|---|
| 1 | #! /usr/bin/env ruby -S rspec
|
|---|
| 2 | require 'spec_helper_acceptance'
|
|---|
| 3 |
|
|---|
| 4 | describe 'merge function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
|
|---|
| 5 | describe 'success' do
|
|---|
| 6 | it 'should merge two hashes' do
|
|---|
| 7 | pp = <<-EOS
|
|---|
| 8 | $a = {'one' => 1, 'two' => 2, 'three' => { 'four' => 4 } }
|
|---|
| 9 | $b = {'two' => 'dos', 'three' => { 'five' => 5 } }
|
|---|
| 10 | $o = merge($a, $b)
|
|---|
| 11 | notice(inline_template('merge[one] is <%= @o["one"].inspect %>'))
|
|---|
| 12 | notice(inline_template('merge[two] is <%= @o["two"].inspect %>'))
|
|---|
| 13 | notice(inline_template('merge[three] is <%= @o["three"].inspect %>'))
|
|---|
| 14 | EOS
|
|---|
| 15 |
|
|---|
| 16 | apply_manifest(pp, :catch_failures => true) do |r|
|
|---|
| 17 | expect(r.stdout).to match(/merge\[one\] is ("1"|1)/)
|
|---|
| 18 | expect(r.stdout).to match(/merge\[two\] is "dos"/)
|
|---|
| 19 | expect(r.stdout).to match(/merge\[three\] is {"five"=>("5"|5)}/)
|
|---|
| 20 | end
|
|---|
| 21 | end
|
|---|
| 22 | end
|
|---|
| 23 | end
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.