2011-10-30 18:13:50 -04:00
|
|
|
! Copyright (C) 2011 Doug Coleman.
|
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
2014-03-11 14:37:00 -04:00
|
|
|
USING: io.standard-paths io.standard-paths.unix sequences
|
|
|
|
tools.test ;
|
2011-10-30 18:13:50 -04:00
|
|
|
IN: io.standard-paths.unix.tests
|
|
|
|
|
2014-03-11 14:37:00 -04:00
|
|
|
{ f } [ "" find-in-path ] unit-test
|
|
|
|
{ t } [
|
|
|
|
"ls" find-in-path { "/bin/ls" "/usr/bin/ls" } member?
|
|
|
|
] unit-test
|
2014-04-22 02:17:44 -04:00
|
|
|
|
|
|
|
! On Ubuntu, the path is ``/sbin/ifconfig``, however
|
|
|
|
! find-in-path uses the PATH environment variable which does
|
|
|
|
! not include this directory. So we can just make sure it runs.
|
|
|
|
{ } [ "ifconfig" find-in-path drop ] unit-test
|