2016-04-04 13:32:42 -04:00
|
|
|
USING: accessors calendar destructors io.directories io.monitors
|
|
|
|
io.pathnames io.timeouts kernel namespaces tools.test ;
|
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
|
|
|
[
|
2016-04-04 13:32:42 -04:00
|
|
|
! Non-recursive
|
|
|
|
{ } [
|
|
|
|
"." f <monitor> "m" set
|
|
|
|
3 seconds "m" get set-timeout
|
|
|
|
"." touch-file
|
|
|
|
] unit-test
|
2016-03-31 03:23:13 -04:00
|
|
|
|
2016-04-04 13:32:42 -04:00
|
|
|
{ t } [
|
|
|
|
"m" get next-change path>>
|
|
|
|
[ "" = ] [ "." absolute-path = ] bi or
|
|
|
|
] unit-test
|
2016-03-31 03:23:13 -04:00
|
|
|
|
2016-04-04 13:32:42 -04:00
|
|
|
{ } [ "m" get dispose ] unit-test
|
2016-03-31 03:23:13 -04:00
|
|
|
|
2016-04-04 13:32:42 -04:00
|
|
|
! Recursive
|
|
|
|
{ } [
|
|
|
|
"." t <monitor> "m" set
|
|
|
|
3 seconds "m" get set-timeout
|
|
|
|
"." touch-file
|
|
|
|
] unit-test
|
2016-03-31 03:23:13 -04:00
|
|
|
|
2016-04-04 13:32:42 -04:00
|
|
|
{ t } [
|
|
|
|
"m" get next-change path>>
|
|
|
|
[ "" = ] [ "." absolute-path = ] bi or
|
|
|
|
] unit-test
|
2016-03-31 03:23:13 -04:00
|
|
|
|
2016-04-04 13:32:42 -04:00
|
|
|
{ } [ "m" get dispose ] unit-test
|
|
|
|
] with-monitors
|
|
|
|
] with-test-directory
|