@@ -69,21 +69,31 @@ void main() {
69
69
});
70
70
71
71
test ('MemoryFileSystem.test' , () {
72
- final MemoryFileSystem fs = MemoryFileSystem .test (); // creates root directory
72
+ final MemoryFileSystem fs =
73
+ MemoryFileSystem .test (); // creates root directory
73
74
fs.file ('/test1.txt' ).createSync (); // creates file
74
75
fs.file ('/test2.txt' ).createSync (); // creates file
75
76
expect (fs.directory ('/' ).statSync ().modified, DateTime (2000 , 1 , 1 , 0 , 1 ));
76
- expect (fs.file ('/test1.txt' ).statSync ().modified, DateTime (2000 , 1 , 1 , 0 , 2 ));
77
- expect (fs.file ('/test2.txt' ).statSync ().modified, DateTime (2000 , 1 , 1 , 0 , 3 ));
77
+ expect (
78
+ fs.file ('/test1.txt' ).statSync ().modified, DateTime (2000 , 1 , 1 , 0 , 2 ));
79
+ expect (
80
+ fs.file ('/test2.txt' ).statSync ().modified, DateTime (2000 , 1 , 1 , 0 , 3 ));
78
81
fs.file ('/test1.txt' ).createSync ();
79
82
fs.file ('/test2.txt' ).createSync ();
80
- expect (fs.file ('/test1.txt' ).statSync ().modified, DateTime (2000 , 1 , 1 , 0 , 2 )); // file already existed
81
- expect (fs.file ('/test2.txt' ).statSync ().modified, DateTime (2000 , 1 , 1 , 0 , 3 )); // file already existed
83
+ expect (fs.file ('/test1.txt' ).statSync ().modified,
84
+ DateTime (2000 , 1 , 1 , 0 , 2 )); // file already existed
85
+ expect (fs.file ('/test2.txt' ).statSync ().modified,
86
+ DateTime (2000 , 1 , 1 , 0 , 3 )); // file already existed
82
87
fs.file ('/test1.txt' ).writeAsStringSync ('test' ); // touches file
83
- expect (fs.file ('/test1.txt' ).statSync ().modified, DateTime (2000 , 1 , 1 , 0 , 4 ));
84
- expect (fs.file ('/test2.txt' ).statSync ().modified, DateTime (2000 , 1 , 1 , 0 , 3 )); // didn't touch it
85
- fs.file ('/test1.txt' ).copySync ('/test2.txt' ); // creates file, then mutates file (so time changes twice)
86
- expect (fs.file ('/test1.txt' ).statSync ().modified, DateTime (2000 , 1 , 1 , 0 , 4 )); // didn't touch it
87
- expect (fs.file ('/test2.txt' ).statSync ().modified, DateTime (2000 , 1 , 1 , 0 , 6 ));
88
+ expect (
89
+ fs.file ('/test1.txt' ).statSync ().modified, DateTime (2000 , 1 , 1 , 0 , 4 ));
90
+ expect (fs.file ('/test2.txt' ).statSync ().modified,
91
+ DateTime (2000 , 1 , 1 , 0 , 3 )); // didn't touch it
92
+ fs.file ('/test1.txt' ).copySync (
93
+ '/test2.txt' ); // creates file, then mutates file (so time changes twice)
94
+ expect (fs.file ('/test1.txt' ).statSync ().modified,
95
+ DateTime (2000 , 1 , 1 , 0 , 4 )); // didn't touch it
96
+ expect (
97
+ fs.file ('/test2.txt' ).statSync ().modified, DateTime (2000 , 1 , 1 , 0 , 6 ));
88
98
});
89
99
}
0 commit comments