From 70a8c3514123827db10b1b4dea1c399f0fc1640c Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Thu, 8 Sep 2011 15:27:20 -0700 Subject: [PATCH] Don't test ping on any platform higher than windows xp --- extra/ping/ping-tests.factor | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/extra/ping/ping-tests.factor b/extra/ping/ping-tests.factor index e9fc20e54c..5c4cc6e54d 100644 --- a/extra/ping/ping-tests.factor +++ b/extra/ping/ping-tests.factor @@ -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 \ No newline at end of file