Don't test ping on any platform higher than windows xp

Doug Coleman 2011-09-08 15:27:20 -07:00
parent 6932cfeed7
commit 010d4db2a0
1 changed files with 13 additions and 6 deletions

View File

@ -1,8 +1,15 @@
USING: continuations destructors io.sockets kernel ping
tools.test ;
USING: continuations destructors io.sockets kernel math.order
ping system system-info tools.test ;
IN: ping.tests
[ ] [ "localhost" ping drop ] unit-test
[ t ] [ "localhost" alive? ] unit-test
[ t ] [ "127.0.0.1" alive? ] unit-test
[ f ] [ "0.0.0.0" alive? ] unit-test
! { 5 1 } is xp
: test-ping? ( -- ? )
os windows?
os-version { 5 1 } after? and not ;
test-ping? [
[ ] [ "localhost" ping drop ] unit-test
[ t ] [ "localhost" alive? ] unit-test
[ t ] [ "127.0.0.1" alive? ] unit-test
[ f ] [ "0.0.0.0" alive? ] unit-test
] when