2008-12-14 21:03:00 -05:00
|
|
|
IN: io.monitors.linux.tests
|
2008-12-15 04:33:04 -05:00
|
|
|
USING: io.monitors tools.test io.files io.files.temp
|
2016-03-31 03:23:13 -04:00
|
|
|
io.files.unique io.directories io.pathnames system sequences
|
|
|
|
continuations namespaces concurrency.count-downs kernel io
|
|
|
|
threads calendar prettyprint destructors io.timeouts accessors ;
|
2008-06-27 22:51:42 -04:00
|
|
|
|
|
|
|
! On Linux, a notification on the directory itself would report an invalid
|
|
|
|
! path name
|
|
|
|
[
|
2016-03-31 03:23:13 -04:00
|
|
|
[
|
|
|
|
[
|
|
|
|
! Non-recursive
|
|
|
|
{ } [
|
|
|
|
"." f <monitor> "m" set
|
|
|
|
3 seconds "m" get set-timeout
|
|
|
|
"." touch-file
|
|
|
|
] unit-test
|
|
|
|
|
|
|
|
{ t } [
|
|
|
|
"m" get next-change path>>
|
|
|
|
[ "" = ] [ "." absolute-path = ] bi or
|
|
|
|
] unit-test
|
|
|
|
|
|
|
|
{ } [ "m" get dispose ] unit-test
|
|
|
|
|
|
|
|
! Recursive
|
|
|
|
{ } [
|
|
|
|
"." t <monitor> "m" set
|
|
|
|
3 seconds "m" get set-timeout
|
|
|
|
"." touch-file
|
|
|
|
] unit-test
|
|
|
|
|
|
|
|
{ t } [
|
|
|
|
"m" get next-change path>>
|
|
|
|
[ "" = ] [ "." absolute-path = ] bi or
|
|
|
|
] unit-test
|
|
|
|
|
|
|
|
{ } [ "m" get dispose ] unit-test
|
|
|
|
] with-monitors
|
|
|
|
] cleanup-unique-directory
|
|
|
|
] with-temp-directory
|