[Swift-commit] r7325 - trunk/tests/documentation/tutorial

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Mon Nov 25 09:48:59 CST 2013


Author: davidk
Date: 2013-11-25 09:48:59 -0600 (Mon, 25 Nov 2013)
New Revision: 7325

Added:
   trunk/tests/documentation/tutorial/fixed_array_mapper.check.sh
   trunk/tests/documentation/tutorial/foreach.check.sh
   trunk/tests/documentation/tutorial/regexp_mapper.check.sh
Removed:
   trunk/tests/documentation/tutorial/fixed_array_mapper.1.count.expected
   trunk/tests/documentation/tutorial/fixed_array_mapper.2.count.expected
   trunk/tests/documentation/tutorial/fixed_array_mapper.3.count.expected
   trunk/tests/documentation/tutorial/foreach.1.count.expected
   trunk/tests/documentation/tutorial/foreach.2.count.expected
   trunk/tests/documentation/tutorial/foreach.3.count.expected
   trunk/tests/documentation/tutorial/regexp_mapper.words.count.expected
Log:
Avoid using .expected files for these tests. Some implementations of wc (mac) add leading whitespace causing the tests to fail. Use grep to be a little less strict


Deleted: trunk/tests/documentation/tutorial/fixed_array_mapper.1.count.expected
===================================================================
--- trunk/tests/documentation/tutorial/fixed_array_mapper.1.count.expected	2013-11-25 15:30:53 UTC (rev 7324)
+++ trunk/tests/documentation/tutorial/fixed_array_mapper.1.count.expected	2013-11-25 15:48:59 UTC (rev 7325)
@@ -1 +0,0 @@
-1 fixed_array_mapper.1.txt

Deleted: trunk/tests/documentation/tutorial/fixed_array_mapper.2.count.expected
===================================================================
--- trunk/tests/documentation/tutorial/fixed_array_mapper.2.count.expected	2013-11-25 15:30:53 UTC (rev 7324)
+++ trunk/tests/documentation/tutorial/fixed_array_mapper.2.count.expected	2013-11-25 15:48:59 UTC (rev 7325)
@@ -1 +0,0 @@
-2 fixed_array_mapper.2.txt

Deleted: trunk/tests/documentation/tutorial/fixed_array_mapper.3.count.expected
===================================================================
--- trunk/tests/documentation/tutorial/fixed_array_mapper.3.count.expected	2013-11-25 15:30:53 UTC (rev 7324)
+++ trunk/tests/documentation/tutorial/fixed_array_mapper.3.count.expected	2013-11-25 15:48:59 UTC (rev 7325)
@@ -1 +0,0 @@
-3 fixed_array_mapper.3.txt

Added: trunk/tests/documentation/tutorial/fixed_array_mapper.check.sh
===================================================================
--- trunk/tests/documentation/tutorial/fixed_array_mapper.check.sh	                        (rev 0)
+++ trunk/tests/documentation/tutorial/fixed_array_mapper.check.sh	2013-11-25 15:48:59 UTC (rev 7325)
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+set -x
+
+grep "1 fixed_array_mapper.1.txt" fixed_array_mapper.1.count || exit 1
+grep "2 fixed_array_mapper.2.txt" fixed_array_mapper.2.count || exit 1
+grep "3 fixed_array_mapper.3.txt" fixed_array_mapper.3.count || exit 1
+
+exit 0


Property changes on: trunk/tests/documentation/tutorial/fixed_array_mapper.check.sh
___________________________________________________________________
Added: svn:executable
   + *

Deleted: trunk/tests/documentation/tutorial/foreach.1.count.expected
===================================================================
--- trunk/tests/documentation/tutorial/foreach.1.count.expected	2013-11-25 15:30:53 UTC (rev 7324)
+++ trunk/tests/documentation/tutorial/foreach.1.count.expected	2013-11-25 15:48:59 UTC (rev 7325)
@@ -1 +0,0 @@
-1 foreach.1.txt

Deleted: trunk/tests/documentation/tutorial/foreach.2.count.expected
===================================================================
--- trunk/tests/documentation/tutorial/foreach.2.count.expected	2013-11-25 15:30:53 UTC (rev 7324)
+++ trunk/tests/documentation/tutorial/foreach.2.count.expected	2013-11-25 15:48:59 UTC (rev 7325)
@@ -1 +0,0 @@
-2 foreach.2.txt

Deleted: trunk/tests/documentation/tutorial/foreach.3.count.expected
===================================================================
--- trunk/tests/documentation/tutorial/foreach.3.count.expected	2013-11-25 15:30:53 UTC (rev 7324)
+++ trunk/tests/documentation/tutorial/foreach.3.count.expected	2013-11-25 15:48:59 UTC (rev 7325)
@@ -1 +0,0 @@
-3 foreach.3.txt

Added: trunk/tests/documentation/tutorial/foreach.check.sh
===================================================================
--- trunk/tests/documentation/tutorial/foreach.check.sh	                        (rev 0)
+++ trunk/tests/documentation/tutorial/foreach.check.sh	2013-11-25 15:48:59 UTC (rev 7325)
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+set -x
+
+grep "1 foreach.1.txt" foreach.1.count || exit 1
+grep "2 foreach.2.txt" foreach.2.count || exit 1
+grep "3 foreach.3.txt" foreach.3.count || exit 1
+
+exit 0


Property changes on: trunk/tests/documentation/tutorial/foreach.check.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: trunk/tests/documentation/tutorial/regexp_mapper.check.sh
===================================================================
--- trunk/tests/documentation/tutorial/regexp_mapper.check.sh	                        (rev 0)
+++ trunk/tests/documentation/tutorial/regexp_mapper.check.sh	2013-11-25 15:48:59 UTC (rev 7325)
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+set -x
+
+grep "5 regexp_mapper.words.txt" regexp_mapper.words.count || exit 1
+
+exit 0


Property changes on: trunk/tests/documentation/tutorial/regexp_mapper.check.sh
___________________________________________________________________
Added: svn:executable
   + *

Deleted: trunk/tests/documentation/tutorial/regexp_mapper.words.count.expected
===================================================================
--- trunk/tests/documentation/tutorial/regexp_mapper.words.count.expected	2013-11-25 15:30:53 UTC (rev 7324)
+++ trunk/tests/documentation/tutorial/regexp_mapper.words.count.expected	2013-11-25 15:48:59 UTC (rev 7325)
@@ -1 +0,0 @@
-5 regexp_mapper.words.txt




More information about the Swift-commit mailing list