From e5c11a5137d538b7713dd8708ca767c208824c06 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 26 Dec 2016 01:17:01 -0800 Subject: 3709 - line numbers in html Each line number also gets an anchor name, but I'm not hyperlinking them for now because I don't want to encourage bookmarking these links just yet. They aren't permalinks because every revision may change what's at any given line number. --- html/090scenario_filesystem_test.mu.html | 228 +++++++++++++++++-------------- 1 file changed, 126 insertions(+), 102 deletions(-) (limited to 'html/090scenario_filesystem_test.mu.html') diff --git a/html/090scenario_filesystem_test.mu.html b/html/090scenario_filesystem_test.mu.html index 20aad6a6..6b9f9452 100644 --- a/html/090scenario_filesystem_test.mu.html +++ b/html/090scenario_filesystem_test.mu.html @@ -6,16 +6,17 @@ - + @@ -23,110 +24,133 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color - +
-# Check our support for fake file systems in scenarios.
-
-scenario read-from-fake-file [
-  local-scope
-  assume-resources [
-    [a] <- [
-      |xyz|
-    ]
-  ]
-  contents:&:source:char <- start-reading resources, [a]
-  1:char/raw <- read contents
-  2:char/raw <- read contents
-  3:char/raw <- read contents
-  4:char/raw <- read contents
-  _, 5:bool/raw <- read contents
-  memory-should-contain [
-    1 <- 120  # x
-    2 <- 121  # y
-    3 <- 122  # z
-    4 <- 10  # newline
-    5 <- 1  # eof
-  ]
-]
-
-scenario write-to-new-fake-file [
-  local-scope
-  assume-resources [
-  ]
-  sink:&:sink:char, writer:num/routine <- start-writing resources, [a]
-  sink <- write sink, 120/x
-  sink <- write sink, 121/y
-  close sink
-  wait-for-routine writer
-  contents-read-back:text <- slurp resources, [a]
-  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-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 [
-    [a] <- []
-  ]
-  sink:&:sink:char, writer:num/routine <- start-writing resources, [a]
-  sink <- write sink, 120/x
-  sink <- write sink, 121/y
-  close sink
-  wait-for-routine writer
-  contents-read-back:text <- slurp resources, [a]
-  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-existing-file-preserves-other-files [
-  local-scope
-  assume-resources [
-    [a] <- []
-    [b] <- [
-      |bcd|
-    ]
-  ]
-  sink:&:sink:char, writer:num/routine <- start-writing resources, [a]
-  sink <- write sink, 120/x
-  sink <- write sink, 121/y
-  close sink
-  wait-for-routine writer
-  contents-read-back:text <- slurp resources, [a]
-  10:bool/raw <- equal contents-read-back, [xy]
-  other-file-contents:text <- slurp resources, [b]
-  11:bool/raw <- equal other-file-contents, [bcd
-]
-  memory-should-contain [
-    10 <- 1  # file contents read back exactly match what was written
-    11 <- 1  # other files also continue to persist unchanged
-  ]
-]
+ 1 # Check our support for fake file systems in scenarios.
+ 2 
+ 3 scenario read-from-fake-file [
+ 4   local-scope
+ 5   assume-resources [
+ 6     [a] <- [
+ 7       |xyz|
+ 8     ]
+ 9   ]
+10   contents:&:source:char <- start-reading resources, [a]
+11   1:char/raw <- read contents
+12   2:char/raw <- read contents
+13   3:char/raw <- read contents
+14   4:char/raw <- read contents
+15   _, 5:bool/raw <- read contents
+16   memory-should-contain [
+17     1 <- 120  # x
+18     2 <- 121  # y
+19     3 <- 122  # z
+20     4 <- 10  # newline
+21     5 <- 1  # eof
+22   ]
+23 ]
+24 
+25 scenario write-to-new-fake-file [
+26   local-scope
+27   assume-resources [
+28   ]
+29   sink:&:sink:char, writer:num/routine <- start-writing resources, [a]
+30   sink <- write sink, 120/x
+31   sink <- write sink, 121/y
+32   close sink
+33   wait-for-routine writer
+34   contents-read-back:text <- slurp resources, [a]
+35   10:bool/raw <- equal contents-read-back, [xy]
+36   memory-should-contain [
+37     10 <- 1  # file contents read back exactly match what was written
+38   ]
+39 ]
+40 
+41 scenario write-to-new-fake-file-2 [
+42   local-scope
+43   assume-resources [
+44     [a] <- [
+45       |abc|
+46     ]
+47   ]
+48   sink:&:sink:char, writer:num/routine <- start-writing resources, [b]
+49   sink <- write sink, 120/x
+50   sink <- write sink, 121/y
+51   close sink
+52   wait-for-routine writer
+53   contents-read-back:text <- slurp resources, [b]
+54   10:bool/raw <- equal contents-read-back, [xy]
+55   memory-should-contain [
+56     10 <- 1  # file contents read back exactly match what was written
+57   ]
+58 ]
+59 
+60 scenario write-to-fake-file-that-exists [
+61   local-scope
+62   assume-resources [
+63     [a] <- []
+64   ]
+65   sink:&:sink:char, writer:num/routine <- start-writing resources, [a]
+66   sink <- write sink, 120/x
+67   sink <- write sink, 121/y
+68   close sink
+69   wait-for-routine writer
+70   contents-read-back:text <- slurp resources, [a]
+71   10:bool/raw <- equal contents-read-back, [xy]
+72   memory-should-contain [
+73     10 <- 1  # file contents read back exactly match what was written
+74   ]
+75 ]
+76 
+77 scenario write-to-existing-file-preserves-other-files [
+78   local-scope
+79   assume-resources [
+80     [a] <- []
+81     [b] <- [
+82       |bcd|
+83     ]
+84   ]
+85   sink:&:sink:char, writer:num/routine <- start-writing resources, [a]
+86   sink <- write sink, 120/x
+87   sink <- write sink, 121/y
+88   close sink
+89   wait-for-routine writer
+90   contents-read-back:text <- slurp resources, [a]
+91   10:bool/raw <- equal contents-read-back, [xy]
+92   other-file-contents:text <- slurp resources, [b]
+93   11:bool/raw <- equal other-file-contents, [bcd
+94 ]
+95   memory-should-contain [
+96     10 <- 1  # file contents read back exactly match what was written
+97     11 <- 1  # other files also continue to persist unchanged
+98   ]
+99 ]
 
-- cgit 1.4.1-2-gfad0