[Swift-commit] r4665 - trunk/tests/language-behaviour
wozniak at ci.uchicago.edu
wozniak at ci.uchicago.edu
Thu Jun 23 13:14:30 CDT 2011
Author: wozniak
Date: 2011-06-23 13:14:30 -0500 (Thu, 23 Jun 2011)
New Revision: 4665
Added:
trunk/tests/language-behaviour/087-iterate-previous.check.sh
trunk/tests/language-behaviour/087-iterate-previous.clean.sh
trunk/tests/language-behaviour/087-iterate-previous.setup.sh
trunk/tests/language-behaviour/087-iterate-previous.swift
Log:
New test for iteration with reference to previous output
Added: trunk/tests/language-behaviour/087-iterate-previous.check.sh
===================================================================
--- trunk/tests/language-behaviour/087-iterate-previous.check.sh (rev 0)
+++ trunk/tests/language-behaviour/087-iterate-previous.check.sh 2011-06-23 18:14:30 UTC (rev 4665)
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+set -x
+
+LINES=$( cat file-*.txt | grep -c HOWDY )
+[[ ${LINES} == 7 ]] || exit 1
+
+exit 0
Property changes on: trunk/tests/language-behaviour/087-iterate-previous.check.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/tests/language-behaviour/087-iterate-previous.clean.sh
===================================================================
--- trunk/tests/language-behaviour/087-iterate-previous.clean.sh (rev 0)
+++ trunk/tests/language-behaviour/087-iterate-previous.clean.sh 2011-06-23 18:14:30 UTC (rev 4665)
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+set -x
+
+rm -fv file-*.txt
+
+exit 0
Property changes on: trunk/tests/language-behaviour/087-iterate-previous.clean.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/tests/language-behaviour/087-iterate-previous.setup.sh
===================================================================
--- trunk/tests/language-behaviour/087-iterate-previous.setup.sh (rev 0)
+++ trunk/tests/language-behaviour/087-iterate-previous.setup.sh 2011-06-23 18:14:30 UTC (rev 4665)
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+set -x
+
+echo HOWDY > file-0.txt
+
+exit 0
Property changes on: trunk/tests/language-behaviour/087-iterate-previous.setup.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/tests/language-behaviour/087-iterate-previous.swift
===================================================================
--- trunk/tests/language-behaviour/087-iterate-previous.swift (rev 0)
+++ trunk/tests/language-behaviour/087-iterate-previous.swift 2011-06-23 18:14:30 UTC (rev 4665)
@@ -0,0 +1,16 @@
+type file;
+
+app (file o) copy(file i) {
+ cp @i @o;
+}
+
+file input<"file-0.txt">;
+
+iterate i {
+ string si = @strcat("file-",i,".txt");
+ int j = i+1;
+ string sj = @strcat("file-",j,".txt");
+ file fi<single_file_mapper;file=si>;
+ file fj<single_file_mapper;file=sj>;
+ fj = copy(fi);
+} until(i==5);
More information about the Swift-commit
mailing list