io.standard-paths.unix: fixing the tests for Ubuntu.
parent
15ab7fe82a
commit
e7a74e0e61
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2011 Doug Coleman.
|
! Copyright (C) 2011 Doug Coleman.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: io.standard-paths io.standard-paths.unix sequences
|
USING: environment io.standard-paths io.standard-paths.unix
|
||||||
tools.test ;
|
sequences tools.test ;
|
||||||
IN: io.standard-paths.unix.tests
|
IN: io.standard-paths.unix.tests
|
||||||
|
|
||||||
{ f } [ "" find-in-path ] unit-test
|
{ f } [ "" find-in-path ] unit-test
|
||||||
|
@ -9,7 +9,12 @@ IN: io.standard-paths.unix.tests
|
||||||
"ls" find-in-path { "/bin/ls" "/usr/bin/ls" } member?
|
"ls" find-in-path { "/bin/ls" "/usr/bin/ls" } member?
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
! On Ubuntu, the path is ``/sbin/ifconfig``, however
|
{ t } [
|
||||||
! find-in-path uses the PATH environment variable which does
|
! On Ubuntu, the path is ``/sbin/ifconfig``, however
|
||||||
! not include this directory. So we can just make sure it runs.
|
! find-in-path uses the PATH environment variable which does
|
||||||
{ } [ "ifconfig" find-in-path drop ] unit-test
|
! not include this directory, so we do.
|
||||||
|
"/sbin:" "PATH" os-env append "PATH" [
|
||||||
|
"ifconfig" find-in-path
|
||||||
|
{ "/sbin/ifconfig" "/usr/bin/ifconfig" } member?
|
||||||
|
] with-os-env
|
||||||
|
] unit-test
|
||||||
|
|
Loading…
Reference in New Issue