diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-08-26 10:45:42 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-08-26 10:45:42 -0700 |
commit | 6641b24768d2d44936352685afac2b318b319cdc (patch) | |
tree | 57a2cfa735464b6bddf8c34d43d0fa6c775ee52e /090scenario_filesystem_test.mu | |
parent | 2d3d88d9558c0445119d8cbae55e8b73937778a4 (diff) | |
download | mu-6641b24768d2d44936352685afac2b318b319cdc.tar.gz |
3254
Diffstat (limited to '090scenario_filesystem_test.mu')
-rw-r--r-- | 090scenario_filesystem_test.mu | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/090scenario_filesystem_test.mu b/090scenario_filesystem_test.mu index de93a2d9..02343cba 100644 --- a/090scenario_filesystem_test.mu +++ b/090scenario_filesystem_test.mu @@ -25,7 +25,23 @@ scenario read-from-fake-file [ scenario write-to-fake-file [ local-scope assume-filesystem [ - #[a] <- [] + ] + sink:address:sink:character, writer:number/routine <- start-writing filesystem:address:filesystem, [a] + sink <- write sink, 120/x + sink <- write sink, 121/y + close sink + wait-for-routine writer + contents-read-back:address:array:character <- slurp filesystem, [a] + 10:boolean/raw <- equal contents-read-back, [xy] + memory-should-contain [ + 10 <- 1 # file contents read back exactly match what was written + ] +] + +scenario write-to-fake-file-that-exists [ + local-scope + assume-filesystem [ + [a] <- [] ] sink:address:sink:character, writer:number/routine <- start-writing filesystem:address:filesystem, [a] sink <- write sink, 120/x |