File: range_to_mask_spec.rb

package info (click to toggle)
puppet-module-vswitch 21.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 596 kB
  • sloc: ruby: 2,189; python: 38; sh: 10; makefile: 10
file content (12 lines) | stat: -rw-r--r-- 461 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
require 'spec_helper'
require 'puppet'

describe 'range_to_mask', :type => :puppet_function do
  # run with param
  it { is_expected.to run.with_params('0-7,16-23,9').and_return('ff02ff') }
  it { is_expected.to run.with_params('0,16,32,48,64').and_return('10001000100010001') }
  # run with empty param
  it { is_expected.to run.with_params('').and_return(nil) }
  #run with params undefined
  it { is_expected.to run.with_params(:undef).and_return(nil) }
end