From ebea4c3f4a3aed3bb0f6c16edd1d44eea965ca6b Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 20 Aug 2016 18:29:09 -0700 Subject: 3231 - reading from fake files in scenarios --- 090scenario_filesystem_test.mu | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 090scenario_filesystem_test.mu (limited to '090scenario_filesystem_test.mu') diff --git a/090scenario_filesystem_test.mu b/090scenario_filesystem_test.mu new file mode 100644 index 00000000..4d4624eb --- /dev/null +++ b/090scenario_filesystem_test.mu @@ -0,0 +1,23 @@ +# Check our support for fake file systems in scenarios. + +scenario read-from-fake-file [ + local-scope + assume-filesystem [ + [a] <- [ + |xyz| + ] + ] + contents:address:source:character <- start-reading filesystem:address:filesystem, [a] + 1:character/raw <- read contents + 2:character/raw <- read contents + 3:character/raw <- read contents + 4:character/raw <- read contents + _, 5:boolean/raw <- read contents + memory-should-contain [ + 1 <- 120 # x + 2 <- 121 # y + 3 <- 122 # z + 4 <- 10 # newline + 5 <- 1 # eof + ] +] -- cgit 1.4.1-2-gfad0