Skip to content

Commit 5fe068f

Browse files
committed
Trying.
1 parent ea92dad commit 5fe068f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

pkgs/watcher/test/utils.dart

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,8 @@ void writeFile(String path, {String? contents, bool? updateModified}) {
329329

330330
/// Writes a file in the sandbox at [link] pointing to [target].
331331
///
332+
/// [target] is relative to the sandbox, not to [link].
333+
///
332334
/// If [updateModified] is `false` and mock modification times are in use, the
333335
/// mock file modification time is not changed.
334336
void writeLink({
@@ -348,6 +350,7 @@ void writeLink({
348350
dir.createSync(recursive: true);
349351
}
350352

353+
//Link(fullPath).createSync(p.join(d.sandbox, target));
351354
Link(fullPath).createSync(p.join(d.sandbox, target));
352355

353356
if (updateModified) {
@@ -376,12 +379,15 @@ void deleteFile(String path) {
376379
/// TODO(davidmorgan): other platforms? Does this delete link or target?
377380
/// Check other delete links.
378381
void deleteLink(String path) {
379-
Link(p.join(d.sandbox, path)).deleteSync();
382+
expect(Link(p.join(d.sandbox, path)).existsSync(), isTrue);
383+
deleteFile(path);
384+
expect(Link(p.join(d.sandbox, path)).existsSync(), isFalse);
385+
/*Link(p.join(d.sandbox, path)).deleteSync();
380386
381387
final mockFileModificationTimes = _mockFileModificationTimes;
382388
if (mockFileModificationTimes != null) {
383389
mockFileModificationTimes.remove(path);
384-
}
390+
}*/
385391
}
386392

387393
/// Renames a file in the sandbox from [from] to [to].

0 commit comments

Comments
 (0)