0.5
app-cordova
debian/bullseye
debian/jessie
|
Last change
on this file since 5519ced 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:
948 bytes
|
| Line | |
|---|
| 1 | #! /usr/bin/env ruby -S rspec
|
|---|
| 2 | require 'spec_helper_acceptance'
|
|---|
| 3 |
|
|---|
| 4 | describe 'time function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
|
|---|
| 5 | describe 'success' do
|
|---|
| 6 | it 'gives the time' do
|
|---|
| 7 | pp = <<-EOS
|
|---|
| 8 | $o = time()
|
|---|
| 9 | notice(inline_template('time is <%= @o.inspect %>'))
|
|---|
| 10 | EOS
|
|---|
| 11 |
|
|---|
| 12 | apply_manifest(pp, :catch_failures => true) do |r|
|
|---|
| 13 | m = r.stdout.match(/time is (\d+)\D/)
|
|---|
| 14 |
|
|---|
| 15 | # When I wrote this test
|
|---|
| 16 | expect(Integer(m[1])).to be > 1398894170
|
|---|
| 17 | end
|
|---|
| 18 | end
|
|---|
| 19 | it 'takes a timezone argument' do
|
|---|
| 20 | pp = <<-EOS
|
|---|
| 21 | $o = time('UTC')
|
|---|
| 22 | notice(inline_template('time is <%= @o.inspect %>'))
|
|---|
| 23 | EOS
|
|---|
| 24 |
|
|---|
| 25 | apply_manifest(pp, :catch_failures => true) do |r|
|
|---|
| 26 | m = r.stdout.match(/time is (\d+)\D/)
|
|---|
| 27 |
|
|---|
| 28 | expect(Integer(m[1])).to be > 1398894170
|
|---|
| 29 | end
|
|---|
| 30 | end
|
|---|
| 31 | end
|
|---|
| 32 | describe 'failure' do
|
|---|
| 33 | it 'handles more arguments'
|
|---|
| 34 | it 'handles invalid timezones'
|
|---|
| 35 | end
|
|---|
| 36 | end
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.