[Swift-commit] r3502 - trunk/tests

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Tue Aug 10 12:33:49 CDT 2010


Author: wozniak
Date: 2010-08-10 12:33:49 -0500 (Tue, 10 Aug 2010)
New Revision: 3502

Added:
   trunk/tests/append.sh
   trunk/tests/tc.template.data
Modified:
   trunk/tests/
   trunk/tests/diamond.swift
Log:
Simplify diamond.swift test



Property changes on: trunk/tests
___________________________________________________________________
Name: svn:ignore
   + tc.data


Added: trunk/tests/append.sh
===================================================================
--- trunk/tests/append.sh	                        (rev 0)
+++ trunk/tests/append.sh	2010-08-10 17:33:49 UTC (rev 3502)
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# Concatenate the INPUT and TEXT to the OUTPUT file
+
+INPUT=$1
+TEXT=$2
+OUTPUT=$3
+
+{
+  cat ${INPUT}
+  echo ${TEXT}
+} > ${OUTPUT}


Property changes on: trunk/tests/append.sh
___________________________________________________________________
Name: svn:executable
   + *

Modified: trunk/tests/diamond.swift
===================================================================
--- trunk/tests/diamond.swift	2010-08-10 02:11:28 UTC (rev 3501)
+++ trunk/tests/diamond.swift	2010-08-10 17:33:49 UTC (rev 3502)
@@ -1,33 +1,27 @@
 type file {};
 
-(file f) generate (float p1) {
-    app {
-		generate "-aTOP -T4" "-p" p1 "-o" @f;
-    }
+app (file f) generate (string s) {
+  echo s stdout=@f;
 }
 
-(file f2) process (file f1, string name, float p2) {
-    app {
-		process "-a" name "-T4" "-p" p2 "-i" @f1 "-o" @f2;
-    }
+app (file f2) process (file f1, string text) {
+  append @f1 text @f2;
 }
 
 (file f3) combine (file f1, file f2) {
-    app {
-		combine "-aBOTTOM -T4" "-i" @f1 @f2 "-o" @f3;
-    }
+  cat @f1 @f2 stdout=@f3;
 }
 
-(file fd) diamond (float p1, float p2) {
-    file fa;
-    file fb; 
-	file fc;
-    
-    fa = generate(p1);
-    fb = process(fa, "LEFT", p2);
-    fc = process(fa, "RIGHT", p2);
+(file fd) diamond (string p1, string p2) {
+    file fa<"fa.txt">;
+    file fb<"fb.txt">;
+    file fc<"fc.txt">;
+
+    fa = generate("TOP");
+    fb = process(fa, p1);
+    fc = process(fa, p2);
     fd = combine(fb, fc);
 }
 
-file final<"FINAL">;
-final = diamond(1, 100);
+file fd<"fd.txt">;
+fd = diamond("LEFT", "RIGHT");

Added: trunk/tests/tc.template.data
===================================================================
--- trunk/tests/tc.template.data	                        (rev 0)
+++ trunk/tests/tc.template.data	2010-08-10 17:33:49 UTC (rev 3502)
@@ -0,0 +1,19 @@
+#This is the transformation catalog.
+#
+#It comes pre-configured with a number of simple transformations with
+#paths that are likely to work on a linux box. However, on some systems,
+#the paths to these executables will be different (for example, sometimes
+#some of these programs are found in /usr/bin rather than in /bin)
+#
+#NOTE WELL: fields in this file must be separated by tabs, not spaces; and
+#there must be no trailing whitespace at the end of each line.
+#
+# sitename  transformation  path   INSTALLED  platform  profiles
+localhost 	echo 		/bin/echo	INSTALLED	INTEL32::LINUX	null
+localhost 	cat 		/bin/cat	INSTALLED	INTEL32::LINUX	null
+localhost 	ls 		/bin/ls		INSTALLED	INTEL32::LINUX	null
+localhost 	grep 		/bin/grep	INSTALLED	INTEL32::LINUX	null
+localhost 	sort 		/bin/sort	INSTALLED	INTEL32::LINUX	null
+localhost 	paste 		/bin/paste	INSTALLED	INTEL32::LINUX	null
+
+localhost       append          _DIR_/append.sh INSTALLED	INTEL32::LINUX	null




More information about the Swift-commit mailing list