[Swift-commit] r4702 - trunk/tests/language-behaviour/foreach

achavez at ci.uchicago.edu achavez at ci.uchicago.edu
Wed Jun 29 08:51:59 CDT 2011


Author: achavez
Date: 2011-06-29 08:51:59 -0500 (Wed, 29 Jun 2011)
New Revision: 4702

Added:
   trunk/tests/language-behaviour/foreach/066-many.check.sh
   trunk/tests/language-behaviour/foreach/066-many.clean.sh
   trunk/tests/language-behaviour/foreach/066-many.setup.sh
   trunk/tests/language-behaviour/foreach/066-many.swift
   trunk/tests/language-behaviour/foreach/066-many.time
   trunk/tests/language-behaviour/foreach/066-many.timeout
   trunk/tests/language-behaviour/foreach/086-iterate-concurrent.check.sh
   trunk/tests/language-behaviour/foreach/086-iterate-concurrent.clean.sh
   trunk/tests/language-behaviour/foreach/086-iterate-concurrent.setup.sh
   trunk/tests/language-behaviour/foreach/086-iterate-concurrent.swift
   trunk/tests/language-behaviour/foreach/087-iterate-previous.check.sh
   trunk/tests/language-behaviour/foreach/087-iterate-previous.clean.sh
   trunk/tests/language-behaviour/foreach/087-iterate-previous.setup.sh
   trunk/tests/language-behaviour/foreach/087-iterate-previous.swift
Log:
Adding subfolder

Copied: trunk/tests/language-behaviour/foreach/066-many.check.sh (from rev 4653, trunk/tests/language-behaviour/066-many.check.sh)
===================================================================
--- trunk/tests/language-behaviour/foreach/066-many.check.sh	                        (rev 0)
+++ trunk/tests/language-behaviour/foreach/066-many.check.sh	2011-06-29 13:51:59 UTC (rev 4702)
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+set -x
+
+[ -f nop ] || exit 1
+
+exit 0

Copied: trunk/tests/language-behaviour/foreach/066-many.clean.sh (from rev 4653, trunk/tests/language-behaviour/066-many.clean.sh)
===================================================================
--- trunk/tests/language-behaviour/foreach/066-many.clean.sh	                        (rev 0)
+++ trunk/tests/language-behaviour/foreach/066-many.clean.sh	2011-06-29 13:51:59 UTC (rev 4702)
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+set -x
+
+rm -v nop || exit 1
+
+exit 0

Copied: trunk/tests/language-behaviour/foreach/066-many.setup.sh (from rev 4653, trunk/tests/language-behaviour/066-many.setup.sh)
===================================================================
--- trunk/tests/language-behaviour/foreach/066-many.setup.sh	                        (rev 0)
+++ trunk/tests/language-behaviour/foreach/066-many.setup.sh	2011-06-29 13:51:59 UTC (rev 4702)
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+set -x
+
+touch nop || exit 1
+
+exit 0

Copied: trunk/tests/language-behaviour/foreach/066-many.swift (from rev 4653, trunk/tests/language-behaviour/066-many.swift)
===================================================================
--- trunk/tests/language-behaviour/foreach/066-many.swift	                        (rev 0)
+++ trunk/tests/language-behaviour/foreach/066-many.swift	2011-06-29 13:51:59 UTC (rev 4702)
@@ -0,0 +1,11 @@
+type file;
+
+app p(file f)
+{
+  touch @f;
+}
+
+foreach i in [1:3000] {
+  file f<"nop">;
+  p(f);
+}

Copied: trunk/tests/language-behaviour/foreach/066-many.time (from rev 4653, trunk/tests/language-behaviour/066-many.time)
===================================================================
--- trunk/tests/language-behaviour/foreach/066-many.time	                        (rev 0)
+++ trunk/tests/language-behaviour/foreach/066-many.time	2011-06-29 13:51:59 UTC (rev 4702)
@@ -0,0 +1 @@
+300

Copied: trunk/tests/language-behaviour/foreach/066-many.timeout (from rev 4653, trunk/tests/language-behaviour/066-many.timeout)
===================================================================
--- trunk/tests/language-behaviour/foreach/066-many.timeout	                        (rev 0)
+++ trunk/tests/language-behaviour/foreach/066-many.timeout	2011-06-29 13:51:59 UTC (rev 4702)
@@ -0,0 +1 @@
+600

Copied: trunk/tests/language-behaviour/foreach/086-iterate-concurrent.check.sh (from rev 4698, trunk/tests/language-behaviour/086-iterate-concurrent.check.sh)
===================================================================
--- trunk/tests/language-behaviour/foreach/086-iterate-concurrent.check.sh	                        (rev 0)
+++ trunk/tests/language-behaviour/foreach/086-iterate-concurrent.check.sh	2011-06-29 13:51:59 UTC (rev 4702)
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+set -x
+
+LINES=$( cat _concurrent/outfile-* | grep -c hello )
+[[ ${LINES} == 12 ]] || exit 1
+
+exit 0

Copied: trunk/tests/language-behaviour/foreach/086-iterate-concurrent.clean.sh (from rev 4698, trunk/tests/language-behaviour/086-iterate-concurrent.clean.sh)
===================================================================
--- trunk/tests/language-behaviour/foreach/086-iterate-concurrent.clean.sh	                        (rev 0)
+++ trunk/tests/language-behaviour/foreach/086-iterate-concurrent.clean.sh	2011-06-29 13:51:59 UTC (rev 4702)
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+set -x
+
+rm -rfv _concurrent
+
+exit 0

Copied: trunk/tests/language-behaviour/foreach/086-iterate-concurrent.setup.sh (from rev 4698, trunk/tests/language-behaviour/086-iterate-concurrent.setup.sh)
===================================================================
--- trunk/tests/language-behaviour/foreach/086-iterate-concurrent.setup.sh	                        (rev 0)
+++ trunk/tests/language-behaviour/foreach/086-iterate-concurrent.setup.sh	2011-06-29 13:51:59 UTC (rev 4702)
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+set -x
+
+rm -rfv _concurrent
+
+exit 0

Copied: trunk/tests/language-behaviour/foreach/086-iterate-concurrent.swift (from rev 4653, trunk/tests/language-behaviour/086-iterate-concurrent.swift)
===================================================================
--- trunk/tests/language-behaviour/foreach/086-iterate-concurrent.swift	                        (rev 0)
+++ trunk/tests/language-behaviour/foreach/086-iterate-concurrent.swift	2011-06-29 13:51:59 UTC (rev 4702)
@@ -0,0 +1,12 @@
+type messagefile;
+
+app (messagefile t) greeting() { 
+        echo "hello" stdout=@filename(t);
+}
+
+iterate i {
+  messagefile outfile;
+  outfile = greeting();
+} until(i>10);
+
+

Copied: trunk/tests/language-behaviour/foreach/087-iterate-previous.check.sh (from rev 4698, trunk/tests/language-behaviour/087-iterate-previous.check.sh)
===================================================================
--- trunk/tests/language-behaviour/foreach/087-iterate-previous.check.sh	                        (rev 0)
+++ trunk/tests/language-behaviour/foreach/087-iterate-previous.check.sh	2011-06-29 13:51:59 UTC (rev 4702)
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+set -x
+
+LINES=$( cat file-*.txt | grep -c HOWDY )
+[[ ${LINES} == 7 ]] || exit 1
+
+exit 0

Copied: trunk/tests/language-behaviour/foreach/087-iterate-previous.clean.sh (from rev 4698, trunk/tests/language-behaviour/087-iterate-previous.clean.sh)
===================================================================
--- trunk/tests/language-behaviour/foreach/087-iterate-previous.clean.sh	                        (rev 0)
+++ trunk/tests/language-behaviour/foreach/087-iterate-previous.clean.sh	2011-06-29 13:51:59 UTC (rev 4702)
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+set -x
+
+rm -fv file-*.txt
+
+exit 0

Copied: trunk/tests/language-behaviour/foreach/087-iterate-previous.setup.sh (from rev 4698, trunk/tests/language-behaviour/087-iterate-previous.setup.sh)
===================================================================
--- trunk/tests/language-behaviour/foreach/087-iterate-previous.setup.sh	                        (rev 0)
+++ trunk/tests/language-behaviour/foreach/087-iterate-previous.setup.sh	2011-06-29 13:51:59 UTC (rev 4702)
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+set -x
+
+echo HOWDY > file-0.txt
+
+exit 0

Copied: trunk/tests/language-behaviour/foreach/087-iterate-previous.swift (from rev 4698, trunk/tests/language-behaviour/087-iterate-previous.swift)
===================================================================
--- trunk/tests/language-behaviour/foreach/087-iterate-previous.swift	                        (rev 0)
+++ trunk/tests/language-behaviour/foreach/087-iterate-previous.swift	2011-06-29 13:51:59 UTC (rev 4702)
@@ -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