[Swift-commit] r5424 - branches/release-0.93/tests/functions

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Fri Dec 16 12:28:15 CST 2011


Author: davidk
Date: 2011-12-16 12:28:15 -0600 (Fri, 16 Dec 2011)
New Revision: 5424

Added:
   branches/release-0.93/tests/functions/501-filenames.check.sh
   branches/release-0.93/tests/functions/501-filenames.out.expected
   branches/release-0.93/tests/functions/501-filenames.setup.sh
   branches/release-0.93/tests/functions/501-filenames.swift
Log:
Test for @filenames


Added: branches/release-0.93/tests/functions/501-filenames.check.sh
===================================================================
--- branches/release-0.93/tests/functions/501-filenames.check.sh	                        (rev 0)
+++ branches/release-0.93/tests/functions/501-filenames.check.sh	2011-12-16 18:28:15 UTC (rev 5424)
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+sum1=`sum 501-filenames.out`
+sum2=`sum 501-filenames.out.expected`
+
+if [ "$sum1" != "$sum2" ]; then
+   echo Error: Created file does not match expected output
+   exit 1
+fi
+
+exit 0


Property changes on: branches/release-0.93/tests/functions/501-filenames.check.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/release-0.93/tests/functions/501-filenames.out.expected
===================================================================
--- branches/release-0.93/tests/functions/501-filenames.out.expected	                        (rev 0)
+++ branches/release-0.93/tests/functions/501-filenames.out.expected	2011-12-16 18:28:15 UTC (rev 5424)
@@ -0,0 +1 @@
+a.txt b.txt c.txt

Added: branches/release-0.93/tests/functions/501-filenames.setup.sh
===================================================================
--- branches/release-0.93/tests/functions/501-filenames.setup.sh	                        (rev 0)
+++ branches/release-0.93/tests/functions/501-filenames.setup.sh	2011-12-16 18:28:15 UTC (rev 5424)
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+cp $GROUP/501-filenames.out.expected .
+echo blah > a.txt
+echo blah > b.txt
+echo blah > c.txt


Property changes on: branches/release-0.93/tests/functions/501-filenames.setup.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/release-0.93/tests/functions/501-filenames.swift
===================================================================
--- branches/release-0.93/tests/functions/501-filenames.swift	                        (rev 0)
+++ branches/release-0.93/tests/functions/501-filenames.swift	2011-12-16 18:28:15 UTC (rev 5424)
@@ -0,0 +1,11 @@
+type file;
+
+app (file o) echo ( file files[] )
+{
+   echo @filenames(files) stdout=@o;
+}
+
+string s[] = [ "a.txt", "b.txt", "c.txt" ];
+file f[] <array_mapper;files=s>;
+file output<"501-filenames.out">;
+output = echo(f);




More information about the Swift-commit mailing list