- Timestamp:
- 04/26/09 12:02:19 (3 years ago)
- File:
-
- 1 edited
-
trunk/src/directory_watcher_test.erl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/directory_watcher_test.erl
r54 r55 119 119 [Foo, Bar, Toto] = [filename: join (Dir, Name) || {file, Name, _} <- Tree], 120 120 Watcher = spawn_link (directory_watcher, init, [Dir, self ()]), 121 {{file, ".txt"}, Bar, found} = receive_one (), 122 {{file, ".txt"}, Foo, found} = receive_one (), 123 {{file, ".erl"}, Toto, found} = receive_one (), 121 Finds = [receive_one(), receive_one(), receive_one()], 122 [FoundBar, FoundFoo, FoundToto] = lists: keysort (2, Finds), 123 {{file, ".txt"}, Bar, found} = FoundBar, 124 {{file, ".txt"}, Foo, found} = FoundFoo, 125 {{file, ".erl"}, Toto, found} = FoundToto, 124 126 125 127 ok = file: write_file (Foo, list_to_binary ("Bye")), … … 130 132 ok = file: write_file (Bar, list_to_binary ("Bye")), 131 133 Watcher ! check, 132 {{file, ".txt"}, Bar, changed} = receive_one (), 133 Watcher ! check, 134 {{file, ".txt"}, Foo, changed} = receive_one (), 134 Changes = [receive_one(), receive_one()], 135 [ChangedBar, ChangedFoo] = lists: keysort (2, Changes), 136 {{file, ".txt"}, Bar, changed} = ChangedBar, 137 {{file, ".txt"}, Foo, changed} = ChangedFoo, 135 138 ok. 136 139
Note: See TracChangeset
for help on using the changeset viewer.
