0.5
app-cordova
debian/bullseye
debian/jessie
|
Last change
on this file since e63d558 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:
955 bytes
|
| Line | |
|---|
| 1 | #! /usr/bin/env ruby -S rspec
|
|---|
| 2 | require 'spec_helper_acceptance'
|
|---|
| 3 |
|
|---|
| 4 | describe 'clamp function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
|
|---|
| 5 | describe 'success' do
|
|---|
| 6 | it 'clamps list of values' do
|
|---|
| 7 | pp = <<-EOS
|
|---|
| 8 | $x = 17
|
|---|
| 9 | $y = 225
|
|---|
| 10 | $z = 155
|
|---|
| 11 | $o = clamp($x, $y, $z)
|
|---|
| 12 | if $o == $z {
|
|---|
| 13 | notify { 'output correct': }
|
|---|
| 14 | }
|
|---|
| 15 | EOS
|
|---|
| 16 |
|
|---|
| 17 | apply_manifest(pp, :catch_failures => true) do |r|
|
|---|
| 18 | expect(r.stdout).to match(/Notice: output correct/)
|
|---|
| 19 | end
|
|---|
| 20 | end
|
|---|
| 21 | it 'clamps array of values' do
|
|---|
| 22 | pp = <<-EOS
|
|---|
| 23 | $a = [7, 19, 66]
|
|---|
| 24 | $b = 19
|
|---|
| 25 | $o = clamp($a)
|
|---|
| 26 | if $o == $b {
|
|---|
| 27 | notify { 'output correct': }
|
|---|
| 28 | }
|
|---|
| 29 | EOS
|
|---|
| 30 |
|
|---|
| 31 | apply_manifest(pp, :catch_failures => true) do |r|
|
|---|
| 32 | expect(r.stdout).to match(/Notice: output correct/)
|
|---|
| 33 | end
|
|---|
| 34 | end
|
|---|
| 35 | end
|
|---|
| 36 | describe 'failure' do
|
|---|
| 37 | it 'handles improper argument counts'
|
|---|
| 38 | it 'handles no arguments'
|
|---|
| 39 | end
|
|---|
| 40 | end
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.