diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-12-11 15:31:04 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-12-11 15:31:04 -0800 |
commit | d5c86dfd8706e6b3ceee7843464797e6fcad4259 (patch) | |
tree | 34f07b48140270e32e0a3eefe136ece090db2170 /090scenario_filesystem_test.mu | |
parent | e7f65b0a4b0af23f5107fb44b8dc39514411589d (diff) | |
download | mu-d5c86dfd8706e6b3ceee7843464797e6fcad4259.tar.gz |
3704
Bugfix: writing to a new file in a non-empty fake file system. The one time I try to get a little clever, it bites me in the ass. That'll teach me..
Diffstat (limited to '090scenario_filesystem_test.mu')
-rw-r--r-- | 090scenario_filesystem_test.mu | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/090scenario_filesystem_test.mu b/090scenario_filesystem_test.mu index c33eeb81..6d212f88 100644 --- a/090scenario_filesystem_test.mu +++ b/090scenario_filesystem_test.mu @@ -22,7 +22,7 @@ scenario read-from-fake-file [ ] ] -scenario write-to-fake-file [ +scenario write-to-new-fake-file [ local-scope assume-resources [ ] @@ -38,6 +38,25 @@ scenario write-to-fake-file [ ] ] +scenario write-to-new-fake-file-2 [ + local-scope + assume-resources [ + [a] <- [ + |abc| + ] + ] + sink:&:sink:char, writer:num/routine <- start-writing resources, [b] + sink <- write sink, 120/x + sink <- write sink, 121/y + close sink + wait-for-routine writer + contents-read-back:text <- slurp resources, [b] + 10:bool/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-resources [ |