factor/basis/io/monitors/linux/linux-tests.factor

38 lines
1.1 KiB
Factor
Raw Normal View History

IN: io.monitors.linux.tests
USING: io.monitors tools.test io.files io.files.temp
io.directories system sequences continuations namespaces
concurrency.count-downs kernel io threads calendar prettyprint
2009-01-29 22:13:49 -05:00
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
[
[ ] [ "monitor-test-self" temp-file make-directories ] unit-test
! Non-recursive
[ ] [ "monitor-test-self" temp-file f <monitor> "m" set ] unit-test
2008-09-15 18:13:48 -04:00
[ ] [ 3 seconds "m" get set-timeout ] unit-test
2008-06-27 22:51:42 -04:00
[ ] [ "monitor-test-self" temp-file touch-file ] unit-test
[ t ] [
"m" get next-change path>>
2008-06-27 23:02:10 -04:00
[ "" = ] [ "monitor-test-self" temp-file = ] bi or
2008-06-27 22:51:42 -04:00
] unit-test
[ ] [ "m" get dispose ] unit-test
! Recursive
[ ] [ "monitor-test-self" temp-file t <monitor> "m" set ] unit-test
2008-09-15 18:13:48 -04:00
[ ] [ 3 seconds "m" get set-timeout ] unit-test
2008-06-27 22:51:42 -04:00
[ ] [ "monitor-test-self" temp-file touch-file ] unit-test
[ t ] [
"m" get next-change path>>
2008-06-27 22:51:42 -04:00
[ "" = ] [ "monitor-test-self" temp-file = ] bi or
] unit-test
[ ] [ "m" get dispose ] unit-test
] with-monitors