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

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Tue Jun 29 14:05:17 CDT 2010


Author: wozniak
Date: 2010-06-29 14:05:17 -0500 (Tue, 29 Jun 2010)
New Revision: 3415

Added:
   trunk/tests/language-behaviour/760-csv-mapper.sh
   trunk/tests/language-behaviour/760-csv-mapper.swift
Log:
Add CSV mapper test (from recent bug fix)
Not sure how to add this to automated testing framework


Added: trunk/tests/language-behaviour/760-csv-mapper.sh
===================================================================
--- trunk/tests/language-behaviour/760-csv-mapper.sh	                        (rev 0)
+++ trunk/tests/language-behaviour/760-csv-mapper.sh	2010-06-29 19:05:17 UTC (rev 3415)
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+NAME=$1
+CSV_OUT=$2
+
+{
+    echo "m"
+    touch $NAME
+    echo $NAME
+} > $CSV_OUT 


Property changes on: trunk/tests/language-behaviour/760-csv-mapper.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/tests/language-behaviour/760-csv-mapper.swift
===================================================================
--- trunk/tests/language-behaviour/760-csv-mapper.swift	                        (rev 0)
+++ trunk/tests/language-behaviour/760-csv-mapper.swift	2010-06-29 19:05:17 UTC (rev 3415)
@@ -0,0 +1,28 @@
+
+type file;
+
+type s
+{
+    file m;
+}
+
+app (file out) create ()
+{
+    echo_sh "file1" @filename(out);
+}
+
+(file result) list (file inf)
+{
+    s diffs[] <csv_mapper; file=inf>;
+    foreach f, i in diffs
+    {
+        tracef("%s\n", @f.m);
+    }
+}
+
+file o<"tmp.csv">;
+file i;
+file p;
+
+o = create();
+p = list(o);




More information about the Swift-commit mailing list