]> granicus.if.org Git - php/commitdiff
Fix time_sleep_until() tests; not supported on Windows on 5.2
authorandy wharmby <wharmby@php.net>
Thu, 27 Aug 2009 19:30:35 +0000 (19:30 +0000)
committerandy wharmby <wharmby@php.net>
Thu, 27 Aug 2009 19:30:35 +0000 (19:30 +0000)
ext/standard/tests/misc/time_sleep_until_basic.phpt
ext/standard/tests/misc/time_sleep_until_error1.phpt
ext/standard/tests/misc/time_sleep_until_error3.phpt
tests/func/time_sleep_until_basic.phpt
tests/func/time_sleep_until_error2.phpt

index 7f2f32d243144078db052087170a93af0d5f1180..ea9d53edf3455a170543ea39d28d7f5e6e7d6a0d 100644 (file)
@@ -1,5 +1,9 @@
 --TEST--
 time_sleep_until() function - basic test for time_sleep_until()
+--SKIPIF--
+<?php
+       function_exists('time_sleep_until') or die('skip time_sleep_until() is not supported in this build.');
+?>
 --CREDITS--
 Manuel Baldassarri mb@ideato.it
 Michele Orselli mo@ideato.it
@@ -10,5 +14,7 @@ Michele Orselli mo@ideato.it
   time_sleep_until( $time );
   var_dump( time() >= $time );
 ?>
+===DONE===
 --EXPECT--
 bool(true)
+===DONE===
index 9752fd70e315e3804c641c6324be4dd9b8acea9c..30cb23f306a12caaecd50038dab9b795ff081a68 100644 (file)
@@ -1,5 +1,9 @@
 --TEST--
 time_sleep_until() function - error test for time_sleep_until()
+--SKIPIF--
+<?php
+       function_exists('time_sleep_until') or die('skip time_sleep_until() is not supported in this build.');
+?>
 --CREDITS--
 Fabio Fabbrucci fabbrucci@grupporetina.com
 Danilo Sanchi sanchi@grupporetina.com
@@ -8,6 +12,8 @@ Danilo Sanchi sanchi@grupporetina.com
 <?php
   var_dump(time_sleep_until(time()-1));
 ?>
+===DONE===
 --EXPECTF--
 Warning: time_sleep_until(): Sleep until to time is less than current time in %s on line 2
 bool(false)
+===DONE===
index 64489618ae293826d3b5fad9525d5b4ff838cb73..8305b1cfff8175334f620eb687a0a5a3cbbbcf93 100644 (file)
@@ -1,5 +1,9 @@
 --TEST--
 time_sleep_until() function - error test for time_sleep_until()
+--SKIPIF--
+<?php
+       function_exists('time_sleep_until') or die('skip time_sleep_until() is not supported in this build.');
+?>
 --CREDITS--
 Francesco Fullone ff@ideato.it
 #PHPTestFest Cesena Italia on 2009-06-20
@@ -7,6 +11,8 @@ Francesco Fullone ff@ideato.it
 <?php
   var_dump(time_sleep_until());
 ?>
+===DONE===
 --EXPECTF--
 Warning: time_sleep_until() expects exactly 1 parameter, 0 given in %s on line 2
 NULL
+===DONE===
index def114cc484c00c3041754a9730a5c4cc011f514..91b0e8a43b87f18b5aef0ebac305ce3f0aba119f 100644 (file)
@@ -1,5 +1,9 @@
 --TEST--
-time_sleep_until —  Make the script sleep until the specified time 
+time_sleep_until() : Make the script sleep until the specified time
+--SKIPIF--
+<?php
+       function_exists('time_sleep_until') or die('skip time_sleep_until() is not supported in this build.');
+?>
 --CREDITS--
 Àlex Corretgé - alex@corretge.cat
 --FILE--
@@ -8,8 +12,11 @@ time_sleep_until —  Make the script sleep until the specified time
 $timeA = time();
 time_sleep_until($timeA+3);
 $timeB = time();
-echo ($timeB - $timeA) . " seconds.";
+echo ($timeB - $timeA) . " seconds.\n";
 
 ?>
+===DONE===
 --EXPECT--
-3 seconds.
\ No newline at end of file
+3 seconds.
+===DONE===
+       
\ No newline at end of file
index bb999b9befdacc9f25afe7a9991958a84b546087..b98f366fd69184fdb47e633d19c57cc135203bc5 100644 (file)
@@ -1,5 +1,9 @@
 --TEST--
-time_sleep_until —  Make the script sleep until the specified time 
+time_sleep_until() : Make the script sleep until the specified time
+--SKIPIF--
+<?php
+       function_exists('time_sleep_until') or die('skip time_sleep_until() is not supported in this build.');
+?>
 --CREDITS--
 Àlex Corretgé - alex@corretge.cat
 --FILE--
@@ -8,9 +12,11 @@ time_sleep_until —  Make the script sleep until the specified time
 $timeA = time();
 time_sleep_until($timeA-3);
 $timeB = time();
-echo ($timeB - $timeA) . " seconds.";
+echo ($timeB - $timeA) . " seconds.\n";
 
 ?>
+===DONE===
 --EXPECTF--
 Warning: time_sleep_until(): Sleep until to time is less than current time in %s.php on line %d
-0 seconds.
\ No newline at end of file
+0 seconds.
+===DONE===
\ No newline at end of file