debian/bullseye
debian/jessie
|
Last change
on this file since 7b68139 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:
945 bytes
|
| Line | |
|---|
| 1 | #! /usr/bin/env ruby -S rspec
|
|---|
| 2 | require 'spec_helper_acceptance'
|
|---|
| 3 |
|
|---|
| 4 | describe 'bool2num function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
|
|---|
| 5 | describe 'success' do
|
|---|
| 6 | ['false', 'f', '0', 'n', 'no'].each do |bool|
|
|---|
| 7 | it "should convert a given boolean, #{bool}, to 0" do
|
|---|
| 8 | pp = <<-EOS
|
|---|
| 9 | $input = "#{bool}"
|
|---|
| 10 | $output = bool2num($input)
|
|---|
| 11 | notify { "$output": }
|
|---|
| 12 | EOS
|
|---|
| 13 |
|
|---|
| 14 | apply_manifest(pp, :catch_failures => true) do |r|
|
|---|
| 15 | expect(r.stdout).to match(/Notice: 0/)
|
|---|
| 16 | end
|
|---|
| 17 | end
|
|---|
| 18 | end
|
|---|
| 19 |
|
|---|
| 20 | ['true', 't', '1', 'y', 'yes'].each do |bool|
|
|---|
| 21 | it "should convert a given boolean, #{bool}, to 1" do
|
|---|
| 22 | pp = <<-EOS
|
|---|
| 23 | $input = "#{bool}"
|
|---|
| 24 | $output = bool2num($input)
|
|---|
| 25 | notify { "$output": }
|
|---|
| 26 | EOS
|
|---|
| 27 |
|
|---|
| 28 | apply_manifest(pp, :catch_failures => true) do |r|
|
|---|
| 29 | expect(r.stdout).to match(/Notice: 1/)
|
|---|
| 30 | end
|
|---|
| 31 | end
|
|---|
| 32 | end
|
|---|
| 33 | end
|
|---|
| 34 | end
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.