about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-03-14 11:57:51 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-03-14 11:57:51 -0700
commit38104e76bdf9f50c803da9cd81653c0786f836a7 (patch)
treef701184155ef0dd878cc95859d342f570e65cba7
parent12c797727143b834fec992e5ea8acaebd54adb8f (diff)
downloadmu-38104e76bdf9f50c803da9cd81653c0786f836a7.tar.gz
2780
Automate this manual test I've been using.
-rw-r--r--064rewrite_literal_string.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/064rewrite_literal_string.cc b/064rewrite_literal_string.cc
index 82d3e22e..88618be4 100644
--- a/064rewrite_literal_string.cc
+++ b/064rewrite_literal_string.cc
@@ -1,5 +1,16 @@
 //: allow using literal strings anywhere that will accept immutable strings
 
+:(scenario passing_literals_to_recipes)
+def main [
+  1:number/raw <- foo [abc]
+]
+def foo x:address:shared:array:character -> n:number [
+  local-scope
+  load-ingredients
+  n <- length *x
+]
++mem: storing 3 in location 1
+
 :(before "End Instruction Inserting/Deleting Transforms")
 initialize_transform_rewrite_literal_string_to_text();
 Transform.push_back(rewrite_literal_string_to_text);