[Swift-commit] r2116 - trunk/tests/language-behaviour

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Tue Jul 15 02:46:50 CDT 2008


Author: benc
Date: 2008-07-15 02:46:50 -0500 (Tue, 15 Jul 2008)
New Revision: 2116

Added:
   trunk/tests/language-behaviour/076-structured-regexp-mapper.b.out.expected
   trunk/tests/language-behaviour/076-structured-regexp-mapper.swift
   trunk/tests/language-behaviour/077-regexp-mapper.foo.out.expected
   trunk/tests/language-behaviour/077-regexp-mapper.swift
Log:
bug 148. change handling of backslash symbol in string literals.

Added: trunk/tests/language-behaviour/076-structured-regexp-mapper.b.out.expected
===================================================================
--- trunk/tests/language-behaviour/076-structured-regexp-mapper.b.out.expected	                        (rev 0)
+++ trunk/tests/language-behaviour/076-structured-regexp-mapper.b.out.expected	2008-07-15 07:46:50 UTC (rev 2116)
@@ -0,0 +1 @@
+Hello, world!

Added: trunk/tests/language-behaviour/076-structured-regexp-mapper.swift
===================================================================
--- trunk/tests/language-behaviour/076-structured-regexp-mapper.swift	                        (rev 0)
+++ trunk/tests/language-behaviour/076-structured-regexp-mapper.swift	2008-07-15 07:46:50 UTC (rev 2116)
@@ -0,0 +1,25 @@
+type messagefile {}
+
+(messagefile t) greeting() { 
+    app {
+        echo "Hello, world!" stdout=@filename(t);
+    }
+}
+
+(messagefile t) greeting2(messagefile ignored) { 
+    app {
+        echo "Hello, world!" stdout=@filename(t);
+    }
+}
+
+
+messagefile outfile <"076-structured-regexp-mapper.a.out">;
+messagefile outfile2 <structured_regexp_mapper;
+    source=outfile,
+    match="(.*)per.a(.*)",
+    transform="\\1per.b\\2"
+>;
+
+outfile = greeting();
+
+outfile2 = greeting2(outfile);

Added: trunk/tests/language-behaviour/077-regexp-mapper.foo.out.expected
===================================================================
--- trunk/tests/language-behaviour/077-regexp-mapper.foo.out.expected	                        (rev 0)
+++ trunk/tests/language-behaviour/077-regexp-mapper.foo.out.expected	2008-07-15 07:46:50 UTC (rev 2116)
@@ -0,0 +1 @@
+hello

Added: trunk/tests/language-behaviour/077-regexp-mapper.swift
===================================================================
--- trunk/tests/language-behaviour/077-regexp-mapper.swift	                        (rev 0)
+++ trunk/tests/language-behaviour/077-regexp-mapper.swift	2008-07-15 07:46:50 UTC (rev 2116)
@@ -0,0 +1,15 @@
+type messagefile;
+
+(messagefile t) greeting() { 
+    app {
+        echo "hello" stdout=@filename(t);
+    }
+}
+
+messagefile outfile <regexp_mapper;
+       source="outfoo",
+       match="(...)(.*)",
+       transform="077-regexp-mapper.\\2.\\1">;
+
+outfile = greeting();
+




More information about the Swift-commit mailing list