]> gitweb.factorcode.org Git - factor.git/blob - extra/ping/ping-tests.factor
Update actions, because Node.js 16 actions are deprecated, to Node.js 20
[factor.git] / extra / ping / ping-tests.factor
1 USING: continuations destructors io.sockets kernel math.order
2 ping system system-info tools.test ;
3 IN: ping.tests
4
5 ! { 5 1 } is xp
6 : test-ping? ( -- ? )
7     os windows?
8     os-version { 5 1 } after? and not ;
9
10 test-ping? [
11     [ ] [ "localhost" ping drop ] unit-test
12     [ t ] [ "localhost" alive? ] unit-test
13     [ t ] [ "127.0.0.1" alive? ] unit-test
14     [ f ] [ "0.0.0.0" alive? ] unit-test
15 ] when